Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to activate next UITextField in a UITableView?

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?

like image 876
Arne Avatar asked Mar 04 '11 16:03

Arne


People also ask

How do you move to the next UITextField when the presses Return?

If you're in a situation where your iOS app has multiple UITextField instances lined up, users expect to be able to move between them by pressing Next/Return on their on-screen keyboard.

Is it possible to add UItableview within a Uitableviewcell?

Implementation of adding a table view inside the cell of UItableview aka, Nested Table View. Used the Power of Autosizing table view and delegate to achieve the expansion and collapse of the cell height.


1 Answers

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.

like image 76
Anh Avatar answered Oct 13 '22 00:10

Anh