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{

        

        

        

    }

  • 相关阅读:
    bestcoder#45 1002 求区间的逆序数 树状数组
    poj2299 Ultra-QuickSort 树状数组求逆序数
    codeforces#323(div2) C. GCD Table 贪心
    bestcoder#58(div2) 1002 LCS 置换
    codeforces#321(div2) E. Kefa and Watch
    1sting
    HDU1013 Digital Roots
    【编程思想】【设计模式】【行为模式Behavioral】catalog
    【编程思想】【设计模式】【行为模式Behavioral】chain
    【编程思想】【设计模式】【结构模式Structural】代理模式Proxy
  • 原文地址:https://www.cnblogs.com/daxueshan/p/6180406.html
Copyright © 2011-2022 走看看