NSVisualEffectView Not Rendering Correctly in macOS 13.6 - Background Color guide
I'm optimizing some code but I'm working on a personal project and I'm sure I'm missing something obvious here, but I'm trying to implement a blurred background effect using `NSVisualEffectView` in my macOS app (targeting macOS 13.6), but I'm working with a question where the background color doesn't render as expected. Instead of the desired translucent blur effect, I'm seeing a solid color, which is not the intended design. Here's a snippet of my implementation: ```swift let visualEffectView = NSVisualEffectView() visualEffectView.frame = NSRect(x: 0, y: 0, width: 300, height: 200) visualEffectView.blendingMode = .behindWindow visualEffectView.material = .sidebar visualEffectView.state = .active // Adding a background color to test visualEffectView.wantsLayer = true visualEffectView.layer?.backgroundColor = NSColor.red.withAlphaComponent(0.5).cgColor self.view.addSubview(visualEffectView) ``` I expected to see a blended effect with the red color slightly visible behind the blurred content, but instead, the visual effect view renders a solid red background without any blur. I've tried adjusting the `blendingMode` and `material`, but the behavior remains the same. Using the `.integrated` material results in a similar solid color output. I've checked my project settings and confirmed that the app is running in a compatible mode for visual effects. Is there something I'm overlooking or a specific configuration that might affect this rendering? Any advice on how to achieve the desired blurred effect while maintaining a background color would be greatly appreciated. This is part of a larger service I'm building. How would you solve this? I'm using Swift LTS in this project. Thanks for taking the time to read this!