How to activate next UITextField in a UITableView?

Arne picture Arne · Mar 4, 2011 · Viewed 14.7k times · Source

I am using this other SO answer for adding UITextFields to my UITableViewCells. However, I am now at a loss how I can let the user focus on the next item by using the next button. Any hints?

Answer

Anh picture Anh · Mar 4, 2011

Try assigning a tag to each UITextField. Once the Next button is pressed, calculate the next tag and use [[UIView viewWithTag:nextTag] becomeFirstResponder] to change the focus to the next text field.