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.
我选中了“控件”部分中的“启用”复选框,并在“属性检查器”的“视图”部分中启用了“启用用户交互”复选框。但是当我运行模拟器并尝试在 UITextField 中单击时,键盘不会出现,也没有迹象表明它被选中。我正在使用 xcode 4.2。
给 UITextField 一个背景颜色,这样您就可以确定它是您期望的位置,并且您实际上是在该字段内点击。
你的方法在这里有效。为确保您可以尝试添加
@property (nonatomic, retain) IBOutlet UITextField *textField;
并将其与您的文本框连接起来。