Альтернативным подходом может быть использование UITableView. Затем большинство элементов управления готовы. Но вы также можете сделать все это самостоятельно.
Сначала поставьте UITextfields на отдельный UIView. Сделайте UIView розеткой, чтобы связать ее правильно. Таким образом вы можете легко перемещать текстовые поля с помощью анимации.
Затем сделать что-то подобное в методах делегата:
// Sets the label of the keyboard's return key to 'Done' when the insertion
// point moves to the table view's last field.
//
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
if ([textField tag] == myLastUITextField)
{
[textField setReturnKeyType:UIReturnKeyDone];
}
return YES;
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
if ([textField returnKeyType] != UIReturnKeyDone)
{
// If this is not the last field (in which case the keyboard's
// return key label will currently be 'Next' rather than 'Done'),
// just move the insertion point to the next field.
//
NSInteger nextTag = [textField tag] + 1;
UIView *nextTextField = [myTextView viewWithTag:nextTag];
// here starts your animation code
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3];
CGRect rect = textFieldView.frame;
rect.origin.y = -44;
textFieldView.frame = rect;
[UIView commitAnimations];
// here ends your animation code. Play with it
[nextTextField becomeFirstResponder];
}
else
{
// do what you want to do with the last UITextfield
}
return YES;
}
`
Я думаю, что это не будет работать сразу по копирования оклейки, но я надеюсь, что это указывает в направлении. Удачи