5

When I try to put an NSTabView inside a vibrant dark Popover (as an NSPopover contentViewController's view) I get a completely black background. When I put it in a regular vibrant dark window, it works. When I put it in a vibrant light popover or window it also works.

Here's a screenshot of the result:

enter image description here

As you can see, the controls inside "go through" the black background and show the vibrancy.

circuitlego
  • 3,469
  • 5
  • 22
  • 22
  • Have you tried telling the view to draw background, not draw background to see if it makes any difference? What happens if you set the background colour to clearColor? – Daniel Farrell Dec 24 '14 at 19:44
  • Checking/Unchecking that setting doesn't make a difference. How would I change the background color? Subclassing? – circuitlego Dec 25 '14 at 06:49
  • Just make sure the tab view is not drawing it's background. Normally there is an option for that in xcode. Otherwise I'm not sure. – Daniel Farrell Dec 25 '14 at 08:43
  • Having the same issue. Did you ever find an answer? – Aaron Mar 01 '16 at 21:14

1 Answers1

2

Subclass of NSTabView and override allowsVibrancy will fix it:

override var allowsVibrancy: Bool {
    return true
}
Max Gribov
  • 388
  • 2
  • 7