开发者

Why doesn't a tap on UITextField open the keyboard?

开发者 https://www.devze.com 2023-03-06 07:19 出处:网络
I\'m very new to Objective-C and Cocoa Touch. I have been following tutorials from a book. Currently I have a UITextField that is supposed to open the keyboard on a tap from the us开发者_JAVA百科er to

I'm very new to Objective-C and Cocoa Touch. I have been following tutorials from a book. Currently I have a UITextField that is supposed to open the keyboard on a tap from the us开发者_JAVA百科er to enter input.

However, when I run the app, nothing happens when I tap on the text field. I've checked all its attributes and made sure that it's enabled and user interaction is enabled.

Is there something really obvious I'm missing? I've read the tutorial two to three times, and I can't figure out what's wrong.


have you linked everything in interface builder (if you created the textfield by XIB)


Set that textfield as firstresponder. See How do I set the firstresponder?.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号