سؤال

I got 2 ImageViews which fade in and out with a timer but I think that needs too much memory so I want a fade animation with one ImageView. Is this possible ?

هل كانت مفيدة؟

المحلول

You can do this by using UIView's + transitionWithView:duration:options:animations:completion: method.

[UIView transitionWithView:yourImageView duration:7.0f options:UIViewAnimationOptionTransitionCrossDissolve animations:^{
       yourImageView.image = newImage;
    } completion:nil];
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top