Created
January 3, 2016 17:39
-
-
Save Athosone/efafde2f3b5edd75d4e8 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
// | |
// Animations.h | |
// thirsty | |
// | |
// Created by Werck Ayrton on 02/06/2015. | |
// Copyright (c) 2015 Nyu Web Developpement. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <POP/POP.h> | |
#import <UIKit/UIKit.h> | |
@interface Animations : NSObject | |
+ (void) addShakingAnimation:(UIView*)destView; | |
@end | |
//Animation.m | |
// | |
// Animations.m | |
// thirsty | |
// | |
// Created by Werck Ayrton on 02/06/2015. | |
// Copyright (c) 2015 Nyu Web Developpement. All rights reserved. | |
// | |
#import "Animations.h" | |
@implementation Animations | |
+ (void) addShakingAnimation:(UIView*)destView | |
{ | |
POPSpringAnimation *shake = [POPSpringAnimation animationWithPropertyNamed:kPOPLayerPositionX]; | |
shake.springBounciness = 20; | |
shake.velocity = @(2500); | |
[destView.layer pop_addAnimation:shake forKey:@"shakeView"]; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment