Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Animating/Moving an image view after navigating back doesn't work

$
0
0

I have a splashscreen in a navigation controller where I animate an imageview into position. After the user inputs some details on that page, it moves to the next navigation view (via a PerformSegue() call), presenting a back button.

When pressing the back button I want to skip the animation and just place the imageview in the correct position, so I do something summarized by the following:

private bool _hasLoadedBefore; public override void ViewWillAppear(){ if(_hasLoadedBefore){ logoImageView.Alpha = 0.5; //this works logoImageView.Center = new PointF(50,100); //this doesn't work } else { logoImageView.Alpha = 0.5; //this works AnimateLogoIntoViewUsingUIKit(); //this works _hasLoadedBefore = true; } }

After navigating backwards, the method is called and the image is set to half alpha. However, the location of the image has not changed. Animating it to the correct position, with a duration of 0s, also doesn't work

I don't see any reason why this works when the view first loads, but not when navigating back to it. Does anyone know why this is happening?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>