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{

        

        

        

    }

  • 相关阅读:
    jqgrid 设置单元格编辑/不可编辑
    [坑]c#中double转字符串精度丢失问题记录
    twemproxy接收流程探索——剖析twemproxy代码正编
    twemproxy代码框架概述——剖析twemproxy代码前编
    twemproxy架构分析——剖析twemproxy代码前编
    剖析twemproxy前言
    mysql交互协议解析——mysql包基础数据、mysql包基本格式
    有关binlog的那点事(三)(mysql5.7.13)
    有关binlog的那点事(二)(mysql5.7.13)
    slave IO流程之二:注册slave请求和dump请求
  • 原文地址:https://www.cnblogs.com/daxueshan/p/6180406.html
Copyright © 2011-2022 走看看