开发者

track user input from UIKeyboard

How can I get user input of the UIKeyboard on the iPhone? I want to track, if the user hits "backspace" when the firstResponder UITextField is empty. I know how I can track a text change but if the field is empty the text don't chang开发者_如何转开发e when hit "backspace".


You can put a single space character as the default textfield text. If it tries to disappear in your textshouldchange delegate then the user hit a backspace. You can remove the leading space before actually using the text result.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜