I have an issue with the new Xcode 4.5 and iOS6. I have a form in my app with various textfields and pickers. I usually navigate through them with the Next key on the onscreen keyboard or pressing tab on my Mac, it seems something new affected the first responder because it doesn't work anymore:
-(UIResponder *)ValidarTextFieldwithCell:(UICellRegister *)Cell{
UIResponder* nextResponder;
UICellRegister *cell2;
NSIndexPath *nextIndexPath = [self nextIndexPath:Cell.MyIndexpath];
cell2= (UICellRegister *)[self.tableView cellForRowAtIndexPath:nextIndexPath];
nextResponder = cell2.Valor;
return nextResponder;
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
UICellRegister *myCell=(UICellRegister *)[[textField superview]superview];
UIResponder* nextResponder;
nextResponder = [self ValidarTextFieldwithCell:myCell];
if (nextResponder) {
[nextResponder becomeFirstResponder];
} else {
[textField resignFirstResponder];
if ([self.parentViewController respondsToSelector:@selector(next:)]) {
[((RegistroViewController *)self.parentViewController) next:nil];
}
if (![self.parentViewController isKindOfClass:[RegistroViewController class]]) {
[self doneButtonPressed:nil];
}
[self animateView:NO withTextfield:nil];
// [self doneButtonPressed];
}
return NO; // We do not want UITextField to insert line-breaks.
}
I'll appreciate any help.