Give a Key equivalent to NSButton dynamically
I want to a开发者_JS百科ssign a key equivalent to an NSButton
if the control is the first responder.
You can override becomeFirstResponder:
and in your implementation call setKeyEquivalent:
. If you want to remove the key equivalent when the button loses first responder status, override resignFirstResponder:
.
精彩评论