标签:
1 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardwasChange:) name:UIKeyboardWillChangeFrameNotification object:nil];
监听键盘之后的操作
可以根据自己的需要调整高度的大小
1 - (void)keyboardwasChange:(NSNotification *)info 2 3 { 4 5 CGRect keyFrame = [info.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]; 6 7 CGFloat tY = keyFrame.origin.y - self.view.frame.size.height - 64; 8 9 10 11 self.view.transform = CGAffineTransformMakeTranslation(0, tY); 12 13 }
参考摘自:http://www.cnblogs.com/paocai2015/p/5057039.html
标签:
原文地址:http://www.cnblogs.com/jw-blog/p/5057370.html