I have an UIImageView
that I want to fade in.
Is there a way to enable that on an underlying UIViewController
?
I have translated the s
You can use this code:
Fade In Animation:
self.yourComponent.alpha = 0.0f;
[UIView beginAnimations:@"fadeIn" context:nil];
[UIView setAnimationDuration:1.0]; // Time in seconds
self.yourComponent.alpha = 1.0f;
Fade Out Animation:
self.yourComponent.alpha = 1.0f;
[UIView beginAnimations:@"fadeOut" context:nil];
[UIView setAnimationDuration:1.0]; // Time in seconds
self.yourComponent.alpha = 0.0f;
self.yourComponent
can be a UIView
, UIImageView
, UIButton
or any other component.