How to activate next UITextField in a UITableView?

前端 未结 4 2062
逝去的感伤
逝去的感伤 2020-12-24 15:05

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 nex

4条回答
  •  天命终不由人
    2020-12-24 15:38

    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.

提交回复
热议问题