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{

        

        

        

    }

  • 相关阅读:
    eclipse中向左缩进快捷键
    如何在Eclipse RCP中使用第三方包
    Eclipse RCP中Viewer交互的三种方式/Make your Eclipse applications richer with view linking
    【技术应用】vs2010 BCGControlBar 静态链编 link2001
    【技术应用】网页信息抓取与分析概要
    【技术应用】vs2010 libjingle login例子
    【技术应用】visual studio 2010 + chromium 更改代码 去掉地址栏
    【敏捷开发实践】起航
    【技术应用】vs2010 下编译 libjingle 库
    【技术应用】visual studio 2010 + chromium 下载编译
  • 原文地址:https://www.cnblogs.com/daxueshan/p/6180406.html
Copyright © 2011-2022 走看看