I'm using an NSTextField
as a search field, and it is bound to a selector. It is triggered when the return key is pressed (as expected), but it is also triggered when the field loses focus.
I don't want the selector to be triggered on lost focus. Is it possible to get around this behavior?
In Interface Builder or the XIB editor of Xcode 4, change the text field's Action property to Send on Enter Only.
See -sendsActionOnEndEditing in the NSCell documentation.
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