How can I put a simple label in a window with a vibrant background (similar to a semi-transparent window)
I can make the window vibrant with that code:
override func viewWillAppear() {
super.viewWillAppear()
let visualEffect = NSVisualEffectView()
visualEffect.blendingMode = .behindWindow
visualEffect.state = .active
visualEffect.material = .light
view.window?.contentView = visualEffect
}
But If I put a simple label with any text in the storyboard, the label is not visible. If I remove the code of the vibrant background the label appear again. Perhaps I should put the label in another layer? if so, how?