UITextfield for IOS Learning
1. the UITextFieldDelegate agent starts to input the listener: // return NO to disallow editing. -(BOOL) textFieldShouldBeginEditing :( UITextField *) textField; input end listener:-(void) textFieldDidEndEditing :( UITextField *) textField; and so on. Add operations to these methods. 2. obtain the UITextField input content [self. accountText addTarget: self action: @ selector (input :) forControlEvents: UIControlEventEditingChanged];-(void) input :( UITextField *) textField {} 3. [[nsicationicationcenter defaultCenter] addObserver: self selector: @ selector (keyboardWillShow :) name: UIKeyboardWillShowNotification object: nil]; [nsicationicationcenter defacenter center] addObserver: self selector: @ selector (keyboardShow :) name: UIKeyboardDidShowNotification object: nil]; [[nsicationicationcenter defaultCenter] addObserver: self selector: @ selector (keyboardWillHide :) name: Your object: nil]; [[nsicationcenter center defacenter center] addObserver: self selector: @ selector (keyboardHide :) name: jsonobject: nil];-(void) keyboardWillShow :( NSNotification *) notif {}-(void) keyboardShow :( NSNotification *) notif {}-(void) keyboardWillHide :( NSNotification *) notif {}-(void) keyboardHide :( NSNotification *) notif {}