Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
调用时如何避免 iPad 键盘被关闭
[textField resignFirstResponder];
由于焦点从前一个文本字段移动到新文本字段,我希望键盘保持在原位。
谢谢
无需调用resignFirstResponder即可将焦点从一个更改TextField为另一个。
resignFirstResponder
TextField
只需调用您要关注becomeFirstResponder的内容即可。testfield
becomeFirstResponder
testfield
不要调用 resignFirstResponder 只是让其他文本字段调用
[textField2 becomeFirstResponder];
键盘应该保留并且第二个文本字段变为活动状态