I have several text fields and would like to set a particular order in which they would cycle when the tab key is pressed. Currently, it starts at a text field with becomeFirstResponder
and then goes on in the default order which xcode put. Can I somehow bypass that order and force the text fields to cycle in a particular order? Like linking the last one of the cycle back to the first one.
Thanks for the help.
Connect the initialFirstResponder
outlet of your window to the first text field, then build a chain by connecting the nextKeyView
outlet of that text field to the text field that should come next (and so on).
That's called the key view loop.
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