zoukankan      html  css  js  c++  java
  • 监听键盘升降

       //注册键盘出现的通知

        [[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{

        

        

        

    }

  • 相关阅读:
    使用C#调用系统API实现锁定计算机
    阶段性总结
    心情状态所困
    VMware虚拟机网络配置相关备忘
    数据库学习第一篇
    给window xp sp2设置共享文件夹
    转报竞赛实操试题
    数据库视频笔记
    Android开发从零开始,搭建交叉编译环境
    排故总结
  • 原文地址:https://www.cnblogs.com/daxueshan/p/6180406.html
Copyright © 2011-2022 走看看