0
-(void)viewDidLoad
{
   [super viewDidLoad];
   imgView.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"splash_slide_1.png"],[UIImage imageNamed:@"splash_slide_1.png"]
 }

我希望图像在 imageview 上反复淡入淡出

4

2 回答 2

2

采用: [UiView animateWithDuration:delay:options:animations:completion:]

然后fadeIn,FadeOut在完成时改变图像,再次fadeIn。但是如果你想要动画重叠,那么你应该使用 2 个 UIImageView。

于 2013-11-08T09:57:45.583 回答
0
UIImage * toImage = [UIImage imageNamed:@"myname.png"];
[UIView transitionWithView:self.view
              duration:5.0f
               options:UIViewAnimationOptionTransitionCrossDissolve
            animations:^{
              self.imageView.image = toImage;
            } completion:nil];
于 2013-11-08T09:41:32.450 回答