Cocoa NSVIew notification when the view gets the key focus?
How can i get a notification if a NSView gets the key focus?
I expected a method like "windowDidBecomeKey" from NSWindow but either i'm blind or there开发者_如何学JAVA is nothing like this is NSView.
The key view, when there is one, is the first responder. So, implement the becomeFirstResponder
method in your view, and either handle that there or post a notification for your controller to listen for.
精彩评论