I have a couple of NSScrollView
s inside an NSPopover in my app. I want to create a Safari-like blur with scrolled content on the top. However I can't find any solution, since it is an NSPopover and I cannot set the style mask. I tried adding a blank row with the height of the header and positioning the header (NSVisualEffectView
) over the NSScrollView
(table view), and this method works but the scroller goes under the header. So is there a "right way" to do it?
NSScrollView provides a nice method called addFloatingSubview:forAxis:
. It should be possible to add the NSVisualEffectsView
as a subview of the scroll view then. By using this method, the scroller stays above the header.
To get the scroller stop before the effects view, you can modify the contentInsets
property of NSScrollView
.