views:

569

answers:

2

I wanna do something like the safari app when fill a form, so when the user see the keyboard do next and move to next control.

Now, how I get the next text control?

+3  A: 

You can handle behaviour like this in textFieldShouldReturn: This should move your focus along the form for you each time the user hits return.

- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
    if(textField == field1) {
        [field1 resignFirstResponder];   
        [field2 becomeFirstResponder];    
        // do stuff with field1 text
    } else if(textField == field2) {
        [field2 resignFirstResponder];   
        [field3 becomeFirstResponder];
        // do stuff with field2 text
    } // and so on

}
Ryan Townshend
+1  A: 

You'll have to roll your own by adding a subview with your own next/previous buttons and positioning it at the top edge of the keyboard.

August