The cursor does not appear when calling startFirstResponder

I have a tableview that contains a text box in each cell, when the user changes the value to, say, textfield1 and clicks on textfield2 , I reload the data in - (void)textFieldDidEndEditing:(UITextField *)textField , since it changes the number of lines in tableview, but in textfield2 cursor is not displayed, only the second time it shows the cursor. I know the problem is reloading the tableview, because when I comment on the call to the reloadData method, the text field is working fine. I tried to save the textfield2 tag and after rebooting after completing the table I called the message becomeFirstResponder on textfield2 , but it does not show the cursor. Does anyone know how I can solve this problem?

Thanks in advance!

Edit: The becomeFirstResponder call in didEndDisplayingCell works fine, but this API is only available in iOS6.0 at least. I tried using willDisplayCell , but this also does not work. So can anyone tell if there is another alternative available in iOS5.0, or is there any other way to handle this?

+4
source share

All Articles