Created
June 21, 2022 10:07
-
-
Save krzyzanowskim/9303041de55d1b388fb19cfb6b606237 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct VisualEffectView: NSViewRepresentable { | |
let material: NSVisualEffectView.Material | |
let blendingMode: NSVisualEffectView.BlendingMode | |
init(material: NSVisualEffectView.Material, blendingMode: NSVisualEffectView.BlendingMode = .withinWindow) { | |
self.material = material | |
self.blendingMode = blendingMode | |
} | |
func makeNSView(context: Context) -> NSVisualEffectView { | |
let view = NSVisualEffectView() | |
view.material = material | |
view.blendingMode = blendingMode | |
return view | |
} | |
func updateNSView(_ nsView: NSVisualEffectView, context: Context) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment