I have an application with a UITableView
with grouped style. On each of the cells, there is a UILabel
with a description, and a UITextField
for the user to enter data.
We implemented a toolbar on top of the keyboard, with next and prev buttons (similar to what MobileSafari provides when filling forms). In order to give focus to the next field, we resorted to using the tag attribute with consecutive numbers, and we find the subview by tag.
We can't use the responder chain because all the textfields have a different parent view (their UITableViewCell
).
However, when using the iPhone Simulator, the Tab key on the keyboard (and Shift-Tab) work as expected and will move the focus to the next or prev textfield, regardless on where it is in the view hierarchy. After seeing that, we are sure there must be an API that provides us the required functionality, but we could not find it. Any hints?