I have an UIImageView
with an image. Now I have a completely new image (graphic file), and want to display that in this UIImageView
. If I just set
myImageView.image = newImage;
the new image is visible immediately. Not animatable.
I want it to nicely fade into the new image. I thought maybe there's a better solution than just creating a new UIImageView
on top of that and blending with animation?
[UIView transitionWithView:textFieldimageView
duration:0.2f
options:UIViewAnimationOptionTransitionCrossDissolve
animations:^{
imageView.image = newImage;
} completion:nil];
is another possibility