以UITextField的键盘弹出顺序为例:先是[textField becomeFirstResponsder]----------->调用textField的代理事件(textFieldShouldBeginEditing)----------->假如textFieldShouldBeginEditing返回YES,,调用代理事件textFieldDidBeginEditing,那么[textField isFirstResponsder]返回YES------------>键盘开始弹出,发送键盘出现通知
UIKeyboardWillShowNotification,当键盘完全出现在屏幕上时,发送UIKeyboardDidShowNotification
键盘消失顺序(与弹出顺序类似):先是[textField resignFirstResponsder]----------->调用(textFieldShouldEndEditing)--------------->假如textFieldShouldEndEditing返回YES,调用textFieldDidEndEditing,[textField isFirstResponsder]返回NO,------------->键盘消失,发送键盘消失通知