iOS:.png 的动画

发布于 2024-12-09 05:14:15 字数 158 浏览 0 评论 0原文

我想为不同版本的 png 制作动画;然后我有这个png的三个版本......一个较暗的版本,一个中等较暗的版本和一个克莱尔版本。在我的动画中,我想做这种类型的

黑暗动画 ->中暗 ->克莱尔->中暗 ->黑暗->中暗->……

可能吗?

I want to animate a png in different versions; then I have three versions of this png... a darker version, a medium darker version and a clare version. In my animation I want to do this type of animation

dark -> medium dark -> clare -> medium dark -> dark -> medium dark ->.....

is it possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

欢烬 2024-12-16 05:14:15

听起来你想要动画 uiimageview

// create the view that will execute our animation
UIImageView* campFireView = [[UIImageView alloc] initWithFrame:self.view.frame];

// load all the frames of our animation
campFireView.animationImages = [NSArray arrayWithObjects:    
                            [UIImage imageNamed:@"campFire01.gif"],
                            [UIImage imageNamed:@"campFire02.gif"],
                            [UIImage imageNamed:@"campFire03.gif"],
                            [UIImage imageNamed:@"campFire04.gif"],
                            [UIImage imageNamed:@"campFire05.gif"],
                            [UIImage imageNamed:@"campFire06.gif"],
                            [UIImage imageNamed:@"campFire07.gif"],
                            [UIImage imageNamed:@"campFire08.gif"],
                            [UIImage imageNamed:@"campFire09.gif"],
                            [UIImage imageNamed:@"campFire10.gif"],
                            [UIImage imageNamed:@"campFire11.gif"],
                            [UIImage imageNamed:@"campFire12.gif"],
                            [UIImage imageNamed:@"campFire13.gif"],
                            [UIImage imageNamed:@"campFire14.gif"],
                            [UIImage imageNamed:@"campFire15.gif"],
                            [UIImage imageNamed:@"campFire16.gif"],
                            [UIImage imageNamed:@"campFire17.gif"], nil];

// all frames will execute in 1.75 seconds
campFireView.animationDuration = 1.75;
// repeat the annimation forever
campFireView.animationRepeatCount = 0;
// start animating
[campFireView startAnimating];
// add the animation view to the main window 
[self.view addSubview:campFireView];

http://appsamuck.com/day2.html

sounds like you want to animate uiimageview

// create the view that will execute our animation
UIImageView* campFireView = [[UIImageView alloc] initWithFrame:self.view.frame];

// load all the frames of our animation
campFireView.animationImages = [NSArray arrayWithObjects:    
                            [UIImage imageNamed:@"campFire01.gif"],
                            [UIImage imageNamed:@"campFire02.gif"],
                            [UIImage imageNamed:@"campFire03.gif"],
                            [UIImage imageNamed:@"campFire04.gif"],
                            [UIImage imageNamed:@"campFire05.gif"],
                            [UIImage imageNamed:@"campFire06.gif"],
                            [UIImage imageNamed:@"campFire07.gif"],
                            [UIImage imageNamed:@"campFire08.gif"],
                            [UIImage imageNamed:@"campFire09.gif"],
                            [UIImage imageNamed:@"campFire10.gif"],
                            [UIImage imageNamed:@"campFire11.gif"],
                            [UIImage imageNamed:@"campFire12.gif"],
                            [UIImage imageNamed:@"campFire13.gif"],
                            [UIImage imageNamed:@"campFire14.gif"],
                            [UIImage imageNamed:@"campFire15.gif"],
                            [UIImage imageNamed:@"campFire16.gif"],
                            [UIImage imageNamed:@"campFire17.gif"], nil];

// all frames will execute in 1.75 seconds
campFireView.animationDuration = 1.75;
// repeat the annimation forever
campFireView.animationRepeatCount = 0;
// start animating
[campFireView startAnimating];
// add the animation view to the main window 
[self.view addSubview:campFireView];

http://appsamuck.com/day2.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文