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{

        

        

        

    }

  • 相关阅读:
    第十五篇 -- 学习第十四天打卡20190702
    第三篇 -- 方向
    第十四篇 -- 学习第十三天打卡20190701
    yum更换阿里源
    Jenkins+sonar7.3集成
    xshell 5 书写汉字乱码
    zabbix 短信报警
    zabbix 微信报警
    zabbix邮件报警
    zabbix主动监测客户端设置
  • 原文地址:https://www.cnblogs.com/daxueshan/p/6180406.html
Copyright © 2011-2022 走看看