How to change the NSPopover's arrow head posit

2020-03-01 10:20发布

问题:

I have a NSPopover on my app but i want to change the position of the arrow head.
What i have:


What i want:


As you can see in the second image the arrow head of the NSPopover is at the top. How can i do that?
my code:

[_popover showRelativeToRect:[sender bounds] ofView:sender preferredEdge:NSMaxXEdge];

Thank you!

回答1:

Unfortunately, this isn't possible with NSPopover (as of 10.7). You'll have to use an alternative popover, such as the excellent SFBPopovers.