首页 > 移动平台 > 详细

ios 监听系统键盘的出现和消失

时间:2015-05-27 12:22:10      阅读:20072      评论:0      收藏:0      [点我收藏+]


//注册键盘出现的通知

    [[NSNotificationCenter defaultCenter] addObserver:self

                                             selector:@selector(keyboardWasShown:)

                                                 name:UIKeyboardWillShowNotification object:nil];

    //注册键盘消失的通知

    [[NSNotificationCenter defaultCenter] addObserver:self

                                             selector:@selector(keyboardWillBeHidden:)

                                                 name:UIKeyboardWillHideNotification object:nil];

- (void)keyboardWasShown:(NSNotification*)aNotification

{

    //键盘高度

    CGRect keyBoardFrame = [[[aNotification userInfo] objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue];

}


-(void)keyboardWillBeHidden:(NSNotification*)aNotification

{


}

ios 监听系统键盘的出现和消失

原文:http://blog.csdn.net/wangzhaobin/article/details/46043337

(2)
(5)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!