//監聽鍵盤事件代理
NSNotificationCenter *center=[NSNotificationCenter defaultCenter];orm
[center addObserver:self selector:@selector(keyboard:) name:UIKeyboardWillChangeFrameNotification object:nil];server
#pragma mark 代理方法事件
- (void)keyboard : (NSNotification *) noteInfo{io
//獲取鍵盤的高度form
CGRect rect=[noteInfo.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue];transform
if (JWScreemSize.height <= 568) {object
//設置頁面升高的高度select
self.view.transform=CGAffineTransformMakeTranslation(0, rect.origin.y-JWScreemSize.height);方法
}
}