动画效果

作者: zmjchuan | 来源:发表于2017-11-25 18:13 被阅读0次

iOS10.3.2上-动画效果无效-原因:??

1. 缩放
  if (animated) {
        // 第一步:将view宽高缩至无限小(点)
        self.finishView.transform = CGAffineTransformScale(CGAffineTransformIdentity,
                                                           CGFLOAT_MIN, CGFLOAT_MIN);
        [UIView animateWithDuration:0.3 animations:^{
            // 第二步: 以动画的形式将view慢慢放大至原始大小的1.2倍
            self.finishView.transform =
            CGAffineTransformScale(CGAffineTransformIdentity, 1.2, 1.2);
        }completion:^(BOOL finished) {
            [UIView animateWithDuration:0.2 animations:^{
                // 第三步: 以动画的形式将view恢复至原始大小
                self.finishView.transform = CGAffineTransformIdentity;
            }];
        }];
    }

以上参考链接

2. 平移
// CGAffineTransformMakeTranslation 平移弹出
     self.uBAlertView.transform = CGAffineTransformMakeTranslation(0.01, SCREEN_HEIGHT);
    [UIView animateWithDuration:0.5 animations:^{
       self.uBAlertView.transform = CGAffineTransformMakeTranslation(0.01, 0.01);
    }];

// 移除
[UIView animateWithDuration:0.5 animations:^{
            self.uBAlertView.transform = CGAffineTransformMakeTranslation(0.01, SCREEN_HEIGHT);
        } completion:^(BOOL finished) {
            [self.uBAlertView removeFromSuperview];
        }];

参考链接

相关文章

网友评论

    本文标题:动画效果

    本文链接:https://www.haomeiwen.com/subject/ucwcbxtx.html