I'm trying to add a flip animation to an UIImageView in Xamarin. The flip animation does work, however, it flips the entire root view. I only want the UIImageView to flip, not the entire screen. Here's what I have:
back = new UIImageView(UIImage.FromBundle("CardBack.jpg"));
back.UserInteractionEnabled = true;
back.Frame = new RectangleF(110, 20, 100, 100);
RootView.AddSubview(back);
front = new UIImageView(UIImage.FromBundle("jack.jpg"));
front.Frame = new RectangleF(110, 20, 100, 100);
The transition code, which occurs when the user touches the image, is as followed:
UIImageView.Transition(
fromView: back,
toView: front,
duration: .5,
options: UIViewAnimationOptions.TransitionFlipFromTop | UIViewAnimationOptions.CurveEaseInOut,
completion: () => { Console.WriteLine("transition complete"); });
How would I just flip the UIImageView, rather than the entire UIView?