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{

        

        

        

    }

  • 相关阅读:
    怎么让百度搜到第一页有自己的
    凡信(超仿微信Android版)开源了,内有源码下载
    可以在GitHub或者码云里 直接搜索 项目 比如 哔哩哔哩
    看雪论坛 破解exe 看雪CTF2017第一题分析-『CrackMe』-看雪安全论坛
    Tomcat+Apache集群方案
    ddms 安卓录制
    Less基础教程
    div+css中height:auto !important; height:663px; min-height:663px !important;区别
    js自定义修改复选框单选框样式,清除复选框单选框默认样式
    css input checkbox和radio样式美化
  • 原文地址:https://www.cnblogs.com/daxueshan/p/6180406.html
Copyright © 2011-2022 走看看