在同一时间对UIView的同一视图中的两个动画 [英] Two animations at the same time on the same view in UIView

查看:107
本文介绍了在同一时间对UIView的同一视图中的两个动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个的UIImageView 和我想申请的两个不同的动画给它,并在同一时间运行它们。第一个动画设置的透明度从0到1,第二个动画的移动 UIView的从一个点到另一个。而当UIView的没有负载时,两个动画一起启动。

I have one UIImageView and I want to apply two different animations to it, and run them at the same time. The first animation set the opacity from 0 to 1, the second animation moves the UIView from one point to another. And when the UIView did load, the two animations start together.

是不可能性?

推荐答案

试试这个

CGPoint movePoint = Your end animation point;
yourView.opaque = 0.0f;
[UIView animateWithDuration:2.0
        animations:^{ 
            yourView.center = movePoint;
           yourview.opaque = 1.0

        } 
        completion:^(BOOL finished){

           //Animation completed

        }];

这篇关于在同一时间对UIView的同一视图中的两个动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆