Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

toofah

macrumors newbie
Original poster
Feb 22, 2010
3
0
I am a newbie to iPhone dev...been doing other GUI dev for 15 years is various languages/technologies.

Is there a "simple" way to use the IB 'Text Input Traits - Return Key' feature to move the cursor from one textbox to another to another and then to the "submit" button when the user hits 'return'?

I know that I can setup a UITextFieldDelegate to handle textFieldShouldReturn and look at the textField passed in and then manually set a different textfield as the first responder, but shouldn't this be done automatically somehow? If I am setting "Next" or "Send" as the value of the Text Input Trait for Return Key, what does this do for me if this does not set something like this up? Shouldn't it just follow the tab order and move me to the next field without setting up any delegate code? It seems really funny to write code like this. Isn't there a way to set a 'default button' and have it get 'clicked' by hitting the return key?

I feel like I must be missing a concept here.

Thanks for your help,

Gary
 
You would have to deal with text field responders. Such as asigning firstresponder to the next field when the user selects the return key. You will have to use the UITextFieldDelegate. You will have to know how many text fields you have unless you right a control that can gather all the text fields in an array. When your on the last textfield change the return to Submit and handle appropriately.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.