键盘高度

//当键盘出现或改变时调用

- (void)keyboardWillShow:(NSNotification *)aNotification

{

    //获取键盘的高度

    NSDictionary *userInfo = [aNotification userInfo];

    NSValue *aValue = [userInfo objectForKey:UIKeyboardFrameEndUserInfoKey];

    CGRect keyboardRect = [aValue CGRectValue];

    self.keyboardHeight = keyboardRect.size.height;

 

}

posted @ 2014-06-06 14:32  回读(IOS)  阅读(239)  评论(0编辑  收藏  举报