1. [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:)name:UIKeyboardWillShowNotification object:nil];
2.- (void)keyboardWillShow:(NSNotification *)notification
{
id userInfo=notification.userInfo;
NSValue* keyboard=[userInfo valueForKey:UIKeyboardFrameEndUserInfoKey];
CGFloat height=[keyboard CGRectValue].size.height;
NSLog(@"height=%f",height);}
838

被折叠的 条评论
为什么被折叠?



