Xcode sets the default button for input when creating a form

I am making a form in Xcode using objective-c and cocoa. In the interface builder, I have 2 text fields and 2 buttons. When I create a project and run it, none of the two buttons is selected (highlighted in blue, not white). When the user writes in the text field, the ENTER key must call one of the buttons that must be pressed.

How to do it?

+5
source share
2 answers

You set a key equivalent value for your button in IB. Just click on this field in the attribute inspector and press enter.

+12
source
+3

All Articles