UIView.Animate come back to initial state when ended

caronicolascaronicolas FRUniversity ✭✭
edited October 2015 in Xamarin.iOS

Hi,

I have a little animation to hide a footer on my app, he works well until now, but now, when I deploy I don't know why, the footer came back to the original position when the animation ended...

This is the animation code for my footer move :

private void OnSwipeDetected(UISwipeGestureRecognizer obj) { UIView.Animate(.4, 0, UIViewAnimationOptions.BeginFromCurrentState, () => { var frame = MyBox.Frame; frame.Y += frame.Height; MyBox.Frame = frame; },null); }

I am not sure but I think when my box go out of the screen, the frame was resize and so my incrementation is null...

If anyone has an idea, he could be cool!

Thanks!

Best Answer

Answers

  • caronicolascaronicolas FRUniversity ✭✭

    Hi @lakhanimilan91

    I don't use xib file, I always made all of the display by code but your answer help me to find a solution to my problem.

    Thanks for your help ;)

Sign In or Register to comment.