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 simplest answer, though they all work, C# .NET
for the MonoTouch
users:
public override void ViewDidAppear (bool animated)
{
base.ViewDidAppear (animated);
UIView.BeginAnimations ("fade in");
UIView.SetAnimationDuration (1);
imageView.Alpha = 1;
UIView.CommitAnimations ();
}
Initially set the alpha of your imageview as 0 as imageView.alpha = 0;
- (void)fadeInImage
{
[UIView beginAnimations:@"fade in" context:nil];
[UIView setAnimationDuration:1.0];
imageView.alpha = 1.0;
[UIView commitAnimations];
}