我正在构建一个应用程序,我需要像 Skype 应用程序一样为徽标设置动画。我仍然不确定如何在启动应用程序时出现受影响的 Skype 徽标
问问题
1311 次
2 回答
8
据我对您的问题的理解,您可以尝试在UIImageView
.
NSArray * imageArray = [[NSArray alloc] initWithObjects:[UIImage imageNamed:@"1.png"], [UIImage imageNamed:@"2.png"], nil]; //this will be the frames of animation images in sequence.
ringImage = [[UIImageView alloc]initWithFrame:CGRectMake(100,200,600,600)];
ringImage.animationImages = imageArray;
ringImage.animationDuration = 1.5;//this the animating speed which you can modify
ringImage.contentMode = UIViewContentModeScaleAspectFill;
[ringImage startAnimating];//this method actually does the work of animating your frames.
要停止动画,只需使用[ringImage stopAnimating];
如果这回答了你的问题,请告诉我:)
于 2012-12-18T10:58:08.050 回答