Apple Docs Suck :(

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

Arent those used with NSVisualEffectViews ?

*which apple points you to here

yes… and this is why the docs suck

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 :slight_smile:
That would be far too straight forward
If its not complicated and obtuse they dont do it :stuck_out_tongue: