UITextField 不响应屏幕键盘按下?

发布于 2024-09-15 12:34:34 字数 450 浏览 3 评论 0原文

我遇到了一个非常奇怪的问题,当我单击 UITextField 时,屏幕键盘会弹出,我可以删除文本字段中的字符 - 但我无法输入内容!

背景信息:

我将 UITextField 放入 UITableViewCell 中,而该 UITableViewCell 又是从放入 UIAlertView 的表格中获取的。如果使用 UIView addSubview: 方法将 UITextField 直接放入 UIAlertView 中,我仍然遇到同样的问题。

我过去曾成功编写过一个 UIAlertView ,其中有一个 UITextField 可以正常工作。

任何帮助或建议将不胜感激 - 谢谢!

I've got a really weird problem whereby I when I click on a UITextField the onscreen keyboard pops up, and I can delete characters in the text field - but I cannot type into it!

Background info:

I'm placing the UITextField into a UITableViewCell, which in turn is being got from a table that is being placed into a UIAlertView. I still have the same problem if I place the UITextField directly into the UIAlertView using the UIView addSubview: method.

I have managed to write a UIAlertView in the past that has a UITextField within it working correctly.

Any help or suggestions would be much appreciated - thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

偷得浮生 2024-09-22 12:34:34

答案可以在问题下的评论中找到。

Answer can be found in comments under the question.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文