实现效果如题:点击textField,监听键盘事件实现页面上移
方案一:通用型
1、监听键盘事件
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(keyBoardWillShow:) name:UIKeyboardWillShowNotification object:nil];
[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(keyBoardWillHide:) name:UIKeyboardWillHideNotification object:nil];
2、实现方法
//键盘升起,view向上偏移
- (void)keyBoardWillShow:(NSNotification *)notificat