给constant曾加动效 [UIView animateWithDuration:duration 不起作用解决方案
来源:互联网 发布:京都旅游攻略 知乎 编辑:程序博客网 时间:2024/05/16 04:06
/**
处理键盘弹出、隐藏、更新frame动画
@param duration 动画时间
@param keyboardOriginY 键盘纵向起点
*/
- (void)keybaordAnimationWithDuration:(CGFloat)duration keyboardOriginY:(CGFloat)keyboardOriginY{
//作为视图的键盘,弹出动画也是UIViewAnimationOptionCurveEaseIn的方式
[UIView animateWithDuration:duration delay:0 options:UIViewAnimationOptionCurveEaseIn animations:^{
//text field
CGPoint textFieldOrigin = _viewInput.frame.origin;
CGSize textFieldSize = _viewInput.frame.size;
_bottomViewInput.constant = SCREEN_HEIGHT - keyboardOriginY;
[self.view layoutIfNeeded]; //必须加上这句话才能曾加 constraintlayout 动效
} completion:^(BOOL finished) {
// [self refreshLayout];
}];
}
阅读全文
0 0
- 给constant曾加动效 [UIView animateWithDuration:duration 不起作用解决方案
- UIView animateWithDuration
- UIView animateWithDuration
- UIView animateWithDuration 使用详解
- UIView animateWithDuration 使用详解
- UIView animateWithDuration 使用详解
- UIView animateWithDuration 使用详解
- UIView animateWithDuration 使用详解
- UIView animateWithDuration 使用详解
- UIView animateWithDuration 使用详解
- UIView animateWithDuration 使用详解
- UIView animateWithDuration 使用详解
- UIView animateWithDuration 使用详解
- UIView animateWithDuration 使用详解
- UIView animateWithDuration:animation:completion
- ios UIView animateWithDuration 学习
- UIView animateWithDuration 使用详解
- 给UIView添加阴影不起作用的解决办法
- redis配置认证密码
- java 求解子数组子字符串的问题合集
- 读 《Semantics-aware Visual Localization under Challenging Perceptual Conditions》
- 文章标题 java2集合框架学习(二)ArrayDeque的用法
- adb抓包
- 给constant曾加动效 [UIView animateWithDuration:duration 不起作用解决方案
- mybatis插件安装方法
- Ubuntu下安装完Pycharm创建桌面快捷方式
- kaggle:code 猫狗识别 图像识别TensorFlow图像预处理
- crosswalk代替webview
- android线程管理五(ActivityThread与ApplicationThread)
- 点击popupwindow外部区域,点击事件的响应问题
- static
- AR Camera开发记录(一) -- Rajawali的使用