문제

I have an NSPopover that I can detach as an NSWindow. After this is done, however, the next popover is missing the callout triangle. I find that if I drag the new popover around and position back to the button, I recover the triangle - so it must be that the popover is stuck in the pulled-away state. How can I reset the state after I pull out the window?

Before

enter image description here

After

enter image description here

One thought is that the intent is to make a new NSPopover each time, but that can't be right. Any answers, links, etc. much appreciated.

Update In the Xcode sample code the popover is indeed re-created each time. It happens in the delegate in popoverDidClose.

도움이 되었습니까?

해결책

I think creating a new popover each time is the way to go. It's a cheap operation since the content of the popover is not recreated everytime, just the popover itself.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top