Bleed through from NSButton checkbox on non-transparent NSPopover
The answer, thanks to Willeke, is to add this within AppDelegate.applicationDidFinishLaunching()
popover.appearance = NSAppearance(named: .aqua)
NSSegmentedControl - Odd appearance when placed in blur view
Apparently, labels inside NSSegmentedControl
ignore vibrancy effect.
To fix it, put NSSegmentedControl
inside NSVisualEffectView
with material
set to popover
.
transparent separator line based on nsbox
You can do it by setting color with alpha like this:
[boxOutlet setFillColor:[NSColor colorWithCalibratedRed:0 green:0 blue:0 alpha:0.5]];
It will fill NSBox
with black 50% transparency. Alpha is opacity value.
Note: boxOutlet is IBOutlet of NSBox
.
Result:
Transparent rounded window but with opaque controls
So unsurprisingly, Matt Gemmell's code works just fine and I had made a mistake. I forgot that I was also messing with the alpha of the window elsewhere in my code in order to make it fade out on close.
To to sum it up for others running into this issue, if you set the alpha on the NSWindow the controls in that window will also be transparent. Instead set the alpha on the NSBezierPath fill color in the NSView. Just like Matt Gemmell's code does. :)
Related Topics
How to Pass Data Backwards to a View Controller After Passing Forward
Swift 3/iOS 10/Todayextension - Userdefaults Always Returns Nil
Swift Running Code in Periodically Background
Extending Dictionary with Key and Value Constraints
Playing Multiple Wav Out Multiple Channels Avaudioengine
Swift 3 Cocoa: Use Quicklook to Preview File in Os X
How to Write a Flip Method in Swift
Execute Code on Main Thread from Async F#
How to Convert Curl Request to Swift Using Alamofire
iOS 14 Widget Detect System Theme Change
Wrong Value Returned After Formatting Timestamp
Implement a Custom Staggeregrid in UIview Like Etsy App in Swift
In App Purchase in Skscene Not Working
Why Is The Swiftui List Not Lazy (Compared to Lazyvstack)
A Warning "'Init()' Is Deprecated". [Swift, iOS App, Learning Model]
Animation Triggered Using a Button Stops a Repeatforever Animation Added Onappear
Possible Bug? I Can Create Generic Instance Ignoring Constraint