zoukankan      html  css  js  c++  java
  • 会话 页面,

    1,层被 盖住了,tableview从天上来

    2,textview 多行,field单行,

    3,contentoffset,contentinset,

    4,keyboad 发通知,获取 duration时间,保持同步,

    5,

    - (void)keyboardWillShow:(NSNotification*)notification {

        CGRect _keyboardRect = [[[notification userInfo] objectForKey:_UIKeyboardFrameEndUserInfoKey] CGRectValue];

        [UIViewbeginAnimations:nilcontext:nil];

        [UIViewsetAnimationDelegate:self];

        [UIViewsetAnimationCurve:UIViewAnimationCurveEaseInOut];

        [UIViewsetAnimationDuration:[[[notification userInfo] objectForKey:UIKeyboardAnimationDurationUserInfoKey] floatValue]];

        self.inputView.frame = CGRectMake(self.inputView.frame.origin.x, SharedAppDelegate.window.frame.size.height - 20-_keyboardRect.size.height - self.inputView.frame.size.height, self.inputView.frame.size.width, self.inputView.frame.size.height);

        self.tableView.contentOffset = CGPointMake(self.tableView.contentOffset.x, _keyboardRect.size.height + self.inputView.frame.size.height);

        self.tableView.frame = CGRectMake(self.tableView.frame.origin.x, self.tableView.frame.origin.y, self.tableView.frame.size.width, self.inputView.frame.origin.y - 44);

        [UIViewcommitAnimations];

       }

  • 相关阅读:
    746. 使用最小花费爬楼梯
    1283. 使结果不超过阈值的最小除数
    307. 区域和检索
    303. 区域和检索
    474. 一和零
    600. 不含连续1的非负整数
    命名规范【转】
    .NET中RabbitMq的使用
    C#中json字符串的序列化和反序列化
    c#发送post请求(带参数)
  • 原文地址:https://www.cnblogs.com/guligei/p/3240600.html
Copyright © 2011-2022 走看看