动画效果

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];
        }];

参考链接

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容