views:

203

answers:

1

Hi !

I have a problem which I dont have a clue how to work around. Maybe anyone of you could help me to the correct directions...

Simple I have a UITableView with each cell containing a UITextField. When I´m editing a cell (UITextField) and hit Return Key, a new row is inserted under the current cell. After that I reloadData on the TableView, the new row is showed. Everything is OK here.

Now to my problem, I want to [UITextField becomeFirstResponder] on the newest added row. But I could not find anyway to accomplish this. I could post code but didn't find that necessary.

Cheers.

+1  A: 

You should somehow be able to get the indexPath of the last inserted row. If you have this indexPath you can call the cellForRowAtIndexPath: method of the tableView.

Now you have the last inserted cell and can call the becomeFirstResponder method of the textfield (do you have a custom made cell?).

schaechtele
Yes I have a custom made cell. Your info was brilliant. Ty for that!
f0rz