• ios键盘高度


    - (void)viewDidLoad
    {
        [super viewDidLoad];

        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil];
    }

    - (void)didReceiveMemoryWarning
    {
        [super didReceiveMemoryWarning];
        // Dispose of any resources that can be recreated.
          [[NSNotificationCenter defaultCenter]removeObserver:self];
    }
    -(void)keyboardWillShow:(NSNotification*)notification{
        
        NSDictionary*info=[notification userInfo];
        CGSize kbSize=[[info objectForKey:UIKeyboardFrameEndUserInfoKey]CGRectValue].size;
        //
        NSValue *animationDurationValue = [info objectForKey:UIKeyboardAnimationDurationUserInfoKey];
        
        NSTimeInterval animationDuration;
        
        [animationDurationValue getValue:&animationDuration];
        NSLog(@"keyboard changed, keyboard width = %f, height = %f,animationDuration =%f",
              
              kbSize.width,kbSize.height,animationDuration);
        
    }

  • 相关阅读:
    [离散数学]集合3.1、3.2、3.3
    Hadoop YARN ResourceManager 未授权访问漏洞复现
    dns域传送漏洞
    文件包含漏洞详解
    XXE漏洞详解
    常见cms
    IP地址详解
    帧详解
    IP包头内容详解
    SSRF漏洞详解
  • 原文地址:https://www.cnblogs.com/jiangu66/p/2997492.html
Copyright © 2020-2023  润新知