swiftcocoansviewnspopovernssegmentedcontrol

NSSegmentedControl - Odd appearance when placed in blur view


I have a macOS app with a simple popover view and a NSSegmentedControl placed within it. Everything works fine, apart from the odd appearance of the segmented control. It has this weird square background when placed in the pop over view.

enter image description here

Is there any way to get rid of this?


Solution

  • Apparently, labels inside NSSegmentedControl ignore vibrancy effect.

    To fix it, put NSSegmentedControl inside NSVisualEffectView with material set to popover.