如何在UITableView中激活下一个UITextField? [英] How to activate next UITextField in a UITableView?

查看:124
本文介绍了如何在UITableView中激活下一个UITextField?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用其他SO答案添加 UITextField 到我的 UITableViewCell 。但是,我现在不知道如何通过使用下一个按钮让用户专注于下一个项目。任何提示?

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?

推荐答案

尝试为每个UITextField分配标记。按下Next按钮后,计算下一个标签并使用 [[UIView viewWithTag:nextTag] becomeFirstResponder] 将焦点更改为下一个文本字段。

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.

这篇关于如何在UITableView中激活下一个UITextField?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆