Created
December 19, 2013 19:24
-
-
Save feinoujc/8044715 to your computer and use it in GitHub Desktop.
makes a view "puff up" in size and then back down again using animations
This file contains hidden or 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
using MonoTouch.CoreGraphics; | |
using MonoTouch.UIKit; | |
static class Puffer | |
{ | |
//makes a view "puff up" in size and then back down again using animations | |
public static void PuffUp(this UIView view) | |
{ | |
UIView.Animate(0.2, () => | |
{ | |
view.Transform = CGAffineTransform.MakeScale(1.1f, 1.1f); | |
}); | |
UIView.Animate(0.4, () => | |
{ | |
view.Transform = CGAffineTransform.MakeScale(1f, 1f); | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment