Select the order in which text fields cycle through clicking a tab

I have several text fields and you want to set a specific order in which they will cycle through when you press the tab key. Currently, it starts with a text field with becomeFirstResponder and then continues in the default xcode order. Can I somehow circumvent this order and make text fields cycle in a certain order? As a binding of the last cycle to the first.

Thanks for the help.

+4
source share
2 answers

Connect the output of the initialFirstResponder your window to the first text field, and then build the chain by connecting the output line nextKeyView this text field to the text field that should appear next (and so on).

+5
source

This is called a key presentation loop .

+4
source

All Articles