In my application , there is a table view with 2 text fields per cell. Am assigning tags for each text field. On pressing done button i want to make the next text field the first responder(can be between table cells). But the code now i am using does not work . attaching the present code
NSArray *viewsToBecomeFirstResponder = [tableView subviews];
for (UIView *firstResponder in viewsToBecomeFirstResponder) {
if ([firstResponder isKindOfClass:[UITextField class]]) {
if (firstResponder.tag == nextTag ) {
[firstResponder becomeFirstResponder];
}
}
}
I am not getting the text fields in the sub view array. I am using custom cell for table cells. Please help.
With little modification to Karim's code you can access the textVies like this:
Hope this helps.
Since you are using tag to identify your textview. Another way can be to use text view delegates.
Define a method as listed below –
Elsewhere,