[英]UITextField is not responding
I'm experiencing some problems with UITextField
inside a UITableViewCell
.我在
UITableViewCell
中遇到了UITextField
的一些问题。 Things are working well until I open the iOS media player, watch a short movie and going back to my view.在我打开 iOS 媒体播放器、观看短片并回到我的视图之前,一切都运行良好。
Then, I'm trying to click on the UITextField
, but nothing happens and it does not responds to my clicks.然后,我试图点击
UITextField
,但没有任何反应,并且它不响应我的点击。
In the same screen (it's a UITableView
), I have a switch button (in another row), which is working fine after switching views.在同一个屏幕中(它是
UITableView
),我有一个切换按钮(在另一行),切换视图后工作正常。
My view is implementing the UITextFieldDelegate
protocol and textFieldShouldReturn
in particular.我的观点是特别实现
UITextFieldDelegate
协议和textFieldShouldReturn
。 My implementation of textFieldShouldReturn
is a simple call to: [textField resingFirstResponder]
我的
textFieldShouldReturn
实现是一个简单的调用: [textField resingFirstResponder]
I'll appriciate any thoughts or ideas why it happens and how to solve it.我会提出任何想法或想法为什么会发生以及如何解决它。
Thanks!谢谢! koby
科比
I had this same problem, what fixed it for me was to make sure to return the correct height for the table view cell.我遇到了同样的问题,为我解决的问题是确保为表格视图单元格返回正确的高度。 Check your heightForRowAtIndexPath function - even though you can see all the objects in your cell they may be outside of a clickable/tappable area.
检查您的 heightForRowAtIndexPath function - 即使您可以看到单元格中的所有对象,它们也可能位于可点击/可点击区域之外。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.