-(void)viewDidLoad
{
[super viewDidLoad];
imgView.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"splash_slide_1.png"],[UIImage imageNamed:@"splash_slide_1.png"]
}
我想在imageview上反复淡化fadein
答案 0 :(得分:2)
使用:
[UiView animateWithDuration:delay:options:animations:completion:]
然后fadeIn,FadeOut完成后改变图像,蚂蚁再次褪色。 但是如果你想要动画重叠,那么你应该使用2个UIImageView。
答案 1 :(得分:0)
UIImage * toImage = [UIImage imageNamed:@"myname.png"];
[UIView transitionWithView:self.view
duration:5.0f
options:UIViewAnimationOptionTransitionCrossDissolve
animations:^{
self.imageView.image = toImage;
} completion:nil];