Skip to content

Instantly share code, notes, and snippets.

@feinoujc
Created December 19, 2013 19:24
Show Gist options
  • Save feinoujc/8044715 to your computer and use it in GitHub Desktop.
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
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