UITextField, becomeFirstResponder, resignFirstResponder
When a UITextField object becomes first responder the keyboa开发者_StackOverflow中文版rd magically appears. When it resigns first responder the keyboard magically slides away. What is causing this to happen? Is there something constantly watching in the background and makes the keyboard appear/disappear when it notices a text field becoming/losing first responder?
There is a chconcept called NSNotification which is responsible for keyboard appear/disappear..check the tutorial.
You should have a look at the Notifications section in the Cocoa Fundamentals Guide. There's anything you need to know about notifications there : from definition to use cases.
精彩评论