DaveS
#1
In an attempt to support DarkMode in a Swift app, I have this as one of my “color” assignments
self.layer?.borderColor = NSColor.windowFrameColor.cgColor
which emits a warning of
'windowFrameColor' was deprecated in macOS 11.0: Use NSVisualEffectMaterialTitlebar
But I cannot find an example of how to change this, since NSVisualEffectMaterialTitlebar
isn’t a NSColor
DaveS
#3
yes… and this is why the docs suck
Deprecated
Use an NSVisualEffectView with the NSVisualEffectView.Material.titlebar material instead.
but nowhere can you find HOW to use it … it SHOULD be a simple color for where it is being used (ie. a border of a control)
Oh but apple doesnt use simple colors any more 
That would be far too straight forward
If its not complicated and obtuse they dont do it 
2 Likes