Created
February 17, 2015 18:36
-
-
Save davidortinau/32479aeed28c5b83a0d5 to your computer and use it in GitHub Desktop.
Xamarin iOS Animation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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