I'm using the following code to animate some elements when pressing a UIButton but the UIView.Animate completion callback is't being called when the animation completes.
If I move the UIView.Animate block outside the touchUpInside delegate then the animation completion callback fires. Am I doing something wrong?
close_loginemail.TouchUpInside += delegate(object sender, EventArgs e) {
//Animate first_screen_view and second_screen_view left
UIView.Animate (0.3, 0, UIViewAnimationOptions.CurveEaseInOut, () => {
login_email_view.Alpha = 0.0f;
login_blur.BlurRadius = 0f;
}, //Completion callback
() => {
Console.WriteLine ("test");
login_email_view.Frame = new RectangleF (View.Frame.Width, 0, View.Frame.Width, View.Frame.Height);
if (loginemail_field.IsFirstResponder) {
loginemail_field.ResignFirstResponder ();
}
if (loginpassword_field.IsFirstResponder) {
loginpassword_field.ResignFirstResponder ();
}
});
};