//监听键盘事件
NSNotificationCenter *center=[NSNotificationCenter defaultCenter];
[center addObserver:self selector:@selector(keyboard:) name:UIKeyboardWillChangeFrameNotification object:nil];
#pragma mark 代理方法
- (void)keyboard : (NSNotification *) noteInfo{
//获取键盘的高度
CGRect rect=[noteInfo.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];
if (JWScreemSize.height <= 568) {
//设置页面升高的高度
self.view.transform=CGAffineTransformMakeTranslation(0, rect.origin.y-JWScreemSize.height);
}
}