开发者

Simplest means to fade/dissolve between two UIImageViews

Could someone give me a little direction on creating crossfades/dissolves between two UIImageViews in the same view controller? I am trying to set up an eff开发者_如何学编程ect of a background image slideshow but not sure on the mechanics. Thanks.


The simplest method is to do two alpha fades:

//set up two image views, view1 and view2
view1.alpha = 1.0;
view2.alpha = 0.0;
[myView addSubview: view1];
[myView addSubview: view2];
[UIView beginAnimation: nil context: nil];
view1.alpha = 0.0;
view2.alpha = 1.0;
[UIView commitAnimations];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜