开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜