1

I have a couple of NSScrollViews 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?

Luke
  • 4,908
  • 1
  • 37
  • 59
Andrii Liakh
  • 619
  • 3
  • 16
  • http://stackoverflow.com/questions/24414483/how-can-i-use-nsvisualeffectview-in-windows-title-bar – Luke May 22 '15 at 14:45
  • I forgot to tell that the whole app is made in NSPopover, because it's a statusbar app. So I can't set window.styleMask – Andrii Liakh May 22 '15 at 15:45

1 Answers1

0

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.

mangerlahn
  • 4,746
  • 2
  • 26
  • 50