Skip to content

Instantly share code, notes, and snippets.

@davidortinau
Created February 17, 2015 18:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidortinau/32479aeed28c5b83a0d5 to your computer and use it in GitHub Desktop.
Save davidortinau/32479aeed28c5b83a0d5 to your computer and use it in GitHub Desktop.
Xamarin iOS Animation
UIView.Animate(.2, 0, UIViewAnimationOptions.Autoreverse | UIViewAnimationOptions.CurveEaseInOut, () =>
{
Center = new CGPoint(Origin.X + 20, Origin.Y);
}, () =>
{
Center = Origin;
});
// OR
UIView.Animate(.2, 0, UIViewAnimationOptions.CurveEaseInOut, ResetCheckButton, null);
void ResetCheckButton()
{
CheckedButton.SnapToOrigin();
TitleLabel.StrikePercent = 0;
if (!MenuItem.Completed)
{
CheckedButton.UnHighlight();
CheckedButton.Title = MenuItem.Count.ToString();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment