无法选择 UITextField [英] Unable to select UITextField

查看:30
本文介绍了无法选择 UITextField的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用界面生成器.

I'm using Interface Builder.

在我的 XIB 文件中,我有一个 UIView,我将它用作容器"视图来保存我的 UITextFields.

In my XIB file I have a UIView that I'm using as a "container" view to hold my UITextFields.

我在那个 UIView 中有三个 UITextField.

I have three UITextField in that UIView.

它们都连接到一个 IBOutlet 并且每个的委托都连接到文件的所有者.

They are all wired up to an IBOutlet and the delegate for each is wired to the File's Owner.

Interface Builder 中的所有内容都已选中启用用户交互".

Everything in Interface Builder has 'User Interaction Enabled' checked.

我可以选择,意思是点击弹出键盘,前两个UITextFields.

I can select, meaning click on to bring up the keyboard, the top two UITextFields.

当我点击第三个(底部)UITextField 时,没有任何反应.键盘不会出现.

When I click on the third (bottom) UITextField, nothing happens. The keyboard will not appear.

我可以以编程方式将其设置为 becomeFirstResponder,但是当我通过模拟器点击它或通过设备点击它时,没有任何反应.

I can programmatically set it to becomeFirstResponder, but when I click on it via Simulator, or tap on it via device, nothing happens.

我可以忽略什么?

推荐答案

确保您的第三个 UITextField 或给定的委托连接在文件所有者的.并确保您的第三个文本字段在您当前的视图中.

Make sure that your third UITextField or given delegate connection in file owner's. and make sure that your third Textfield is inside your current view.

这篇关于无法选择 UITextField的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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