码迷,mamicode.com
首页 > 其他好文 > 详细

弹键盘动画

时间:2018-05-16 19:40:57      阅读:139      评论:0      收藏:0      [点我收藏+]

标签:nim   move   traints   mat   options   send   inf   end   otto   

必须在修改约束后调用 .superView layoutIfNeed:  否则没有动画效果

__weak typeof(self)wkSelf = self;
    self.inputTf.qmui_keyboardWillChangeFrameNotificationBlock = ^(QMUIKeyboardUserInfo *keyboardUserInfo) {
        wkSelf.checkMoreBtn.hidden = YES;
        [wkSelf moveUp];
        
        [UIView animateWithDuration:keyboardUserInfo.animationDuration delay:0 options:keyboardUserInfo.animationOptions animations:^{
            [wkSelf.allSendBtn mas_updateConstraints:^(MASConstraintMaker *make) {
                make.bottom.equalTo(-keyboardUserInfo.height);
            }];
            [wkSelf.allSendBtn.superview layoutIfNeeded];
        } completion:nil];
        
    };

 

弹键盘动画

标签:nim   move   traints   mat   options   send   inf   end   otto   

原文地址:https://www.cnblogs.com/tufei7/p/9047551.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!