I'm doing a form in an iPhone application. I'm setting the next field on the return of the keyboard. Everything works fine but if the text field is hidden under the keyboard, it's not scrolling on top of the keyboard dynamically! How can I do this?
Here is my code
It basically set to the next tag (next fileld)
-(BOOL)textFieldShouldReturn:(UITextField*)textField;
{
NSInteger nextTag = textField.tag + 1;
// Try to find next responder
UIResponder* nextResponder = [textField.superview viewWithTag:nextTag];
if (nextResponder) {
// Found next responder, so set it.
[nextResponder becomeFirstResponder];
} else {
// Not found, so remove keyboard.
[textField resignFirstResponder];
}
return NO; // We do not want UITextField to insert line-breaks.
}