当你输入密码时,弹出框将屏幕下方的点击按钮挡住,就用以下方法
1)注册监听,监听键盘的弹出
[[NSNotificationCenterdefaultCenter] addObserver:self selector:@selector(handleKeyBoardNotification:) name:UIKeyboardWillShowNotification object:nil];
(2)在监听的触发方法当中,使用如下代码获取键盘高度
-(void)handleKeyBoardNotification:(NSNotification *)sender {
//获取键盘高度,关键的一句
NSValue *value = [sender.userInfoobjectForKey:@"UIKeyboardBoundsUserInfoKey"];
CGSize keyboardSize = [valueCGRectValue].size;
float keyboardHeight = keyboardSize.height;
}