I'm building a NSView
hierarchy programmatically by putting a NSStackView
into a NSScroller
. I have done this before and my code is correct.
The view hierarchy is what I expect until the first time through the runloop (or display) where macOS Catalina (and I think Mojave) automatically insert a NSVisualEffectView
into the view hierarchy. This is messing up my custom drawing no end..
The hierarchy that I create is
NSScrollView -> NSStackView -> stack subviews
this is "enriched" by the scroll view before the first display loop into:
NSScrollView -> NSClipView -> NSStackView -> stack subviews
and after the first display the NSVisualEffects View is added at the same level as the NSClipView:
NSScrollView -> NSClipView -> NSStackView -> stack subviews
-> NSVisualEffectsView
Is there a way to tell the scroll view that I don't want the visual effects view?
Any help would be appreciated!