I have a 10.7 app that uses a small NSPopover to display some text. The user is never meant to interact with it.
When the NSPopover appears, the underlying view loses key status, and the selection changes colour, etc. Is there a way to get this not to happen?
I do this:
[[NSNotificationCenter defaultCenter] addObserverForName:NSPopoverDidShowNotification
object:myPopover queue:nil usingBlock:^(NSNotification *note) {
[window becomeKeyWindow]; //Reclaim key from popover
[window makeFirstResponder:previousFirstResponder];
}];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With