Created
April 13, 2011 05:57
-
-
Save shaunoconnor/917040 to your computer and use it in GitHub Desktop.
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
| // | |
| // AnimatedView.h | |
| // BlocksAnimation | |
| // | |
| // Created by Shaun O'Connor on 13/04/11. | |
| // | |
| #import "AnimatedView.h" | |
| @implementation AnimatedView | |
| @synthesize animation; | |
| - (void)dealloc | |
| { | |
| [super dealloc]; | |
| [animation release]; | |
| } | |
| - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event | |
| { | |
| [UIView animateWithDuration:0.6 | |
| delay:0 | |
| options:UIViewAnimationOptionAutoreverse | |
| animations:^{ | |
| [UIView setAnimationRepeatCount:1.0]; | |
| self.transform = CGAffineTransformMakeScale(0.1, 0.1); | |
| } | |
| completion:^(BOOL finished){ | |
| self.transform = CGAffineTransformIdentity; | |
| [[NSNotificationCenter defaultCenter] postNotificationName:@"VIEW_ANIMATION_COMPLETE" object:self]; | |
| }]; | |
| } | |
| @end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment