1

I would like the popup to be transparent except for the arrow and the bottom-most part of it (bottom part is no problem, of course). I have a NSTableView in the middle so far.

So in NSPopover I added an NSView on the top and coloured it:

viewTop.wantsLayer = true
viewTop.layer?.backgroundColor = myBackgroundColor

But the topmost part is still transparent. This is that little thing on the very top like an arrow or so. I would like to make it the same light yellow colour as the NSView I put there. Please refer to my screenshots:

popup view hierarchy

I need to colour the topmost little thing here:

A yellow popover with a grey arrow

Alexander
  • 59,041
  • 12
  • 98
  • 151
DevyV
  • 15
  • 3
  • It doesn't seem to be possible with the system-provided `NSPopover`, I'm afraid. You either have to use another popover view implementation, or you could try your hand at [reverse engineering `NSPopover` and see if you can use some private APIs to style it](https://www.youtube.com/watch?v=PTCKXTPUeqY). That might work, but naturally, since you would be relying on non-public implementation details, it can break in any future release. – Alexander Mar 21 '21 at 16:47

0 Answers0