码迷,mamicode.com
首页 > 其他好文 > 详细

resignFirstResponder

时间:2014-11-27 20:06:09      阅读:129      评论:0      收藏:0      [点我收藏+]

标签:io   ar   sp   on   cti   ad   ef   amp   as   

What is this resignFirstResponder business? Here is the short version:
Some view objects are also controls. A control is a view that the user can interact with. Buttons,
sliders, and text fields are examples of controls. (Keep in mind that the term “control” has nothing to
do with “controllers” in MVC.)
When there are controls on the screen, one of them can be the first responder. When a control has first
responder status, it gets the first chance to handle text input from the keyboard and shake events (such
as when the user shakes the device to undo the last action).
When the user interacts with a control that can accept first responder status, that control is sent the
becomeFirstResponder message. When a control that accepts text input (like a text field) becomes the
first responder, the keyboard appears on the screen. At the end of addTask:, you tell the text field to
resign its status, which causes the keyboard to disappear.

resignFirstResponder

标签:io   ar   sp   on   cti   ad   ef   amp   as   

原文地址:http://www.cnblogs.com/playerken/p/4126847.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!