├── .DS_Store ├── AnimationGif.gif ├── ElasticViewAnimation.xcodeproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── xp_mac.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── xcuserdata │ └── xp_mac.xcuserdatad │ │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── ElasticViewAnimation.xcscheme └── project.pbxproj ├── README.md ├── ElasticViewAnimation ├── MainViewController.h ├── UIView+DegressCenter.h ├── AppDelegate.h ├── main.m ├── UIView+DegressCenter.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── Base.lproj │ ├── Main.storyboard │ └── LaunchScreen.storyboard ├── AppDelegate.m └── MainViewController.m ├── .gitignore ├── ElasticViewAnimationTests ├── Info.plist └── ElasticViewAnimationTests.m └── ElasticViewAnimationUITests ├── Info.plist └── ElasticViewAnimationUITests.m /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxp2012/ElasticViewAnimation/HEAD/.DS_Store -------------------------------------------------------------------------------- /AnimationGif.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxp2012/ElasticViewAnimation/HEAD/AnimationGif.gif -------------------------------------------------------------------------------- /ElasticViewAnimation.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ElasticViewAnimation.xcodeproj/project.xcworkspace/xcuserdata/xp_mac.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wxp2012/ElasticViewAnimation/HEAD/ElasticViewAnimation.xcodeproj/project.xcworkspace/xcuserdata/xp_mac.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | DGElasticPullToRefresh效果的OC版本 2 | 3 | ![image](https://github.com/wxp2012/ElasticViewAnimation/blob/master/AnimationGif.gif) 4 | 5 | 详情博客地址:http://blog.csdn.net/w_x_p/article/details/50482815 6 | 7 | 原博客地址:http://iostuts.io/2015/10/17/elastic-bounce-using-uibezierpath-and-pan-gesture/ 8 | -------------------------------------------------------------------------------- /ElasticViewAnimation/MainViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // ElasticViewAnimation 4 | // 5 | // Created by xp_mac on 16/1/11. 6 | // Copyright © 2016年 xp_mac. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MainViewController : UIViewController 12 | 13 | 14 | 15 | @end 16 | 17 | -------------------------------------------------------------------------------- /ElasticViewAnimation/UIView+DegressCenter.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+DegressCenter.h 3 | // ElasticViewAnimation 4 | // 5 | // Created by xp_mac on 16/1/11. 6 | // Copyright © 2016年 xp_mac. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (DegressCenter) 12 | 13 | - (CGPoint) usePresentationLayerIfPossible:(BOOL)theBool; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /ElasticViewAnimation/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ElasticViewAnimation 4 | // 5 | // Created by xp_mac on 16/1/11. 6 | // Copyright © 2016年 xp_mac. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /ElasticViewAnimation/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ElasticViewAnimation 4 | // 5 | // Created by xp_mac on 16/1/11. 6 | // Copyright © 2016年 xp_mac. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ElasticViewAnimation/UIView+DegressCenter.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+DegressCenter.m 3 | // ElasticViewAnimation 4 | // 5 | // Created by xp_mac on 16/1/11. 6 | // Copyright © 2016年 xp_mac. All rights reserved. 7 | // 8 | 9 | #import "UIView+DegressCenter.h" 10 | 11 | @implementation UIView (DegressCenter) 12 | 13 | - (CGPoint) usePresentationLayerIfPossible:(BOOL)theBool 14 | { 15 | if (theBool == YES) { 16 | 17 | CALayer *theLayer = self.layer; 18 | return [[theLayer presentationLayer] position]; 19 | } 20 | 21 | return self.center; 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control 25 | # 26 | #Pods/ 27 | -------------------------------------------------------------------------------- /ElasticViewAnimationTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ElasticViewAnimationUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ElasticViewAnimation.xcodeproj/xcuserdata/xp_mac.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | ElasticViewAnimation.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 887EB3AA1C43537E004B013E 16 | 17 | primary 18 | 19 | 20 | 887EB3C31C43537E004B013E 21 | 22 | primary 23 | 24 | 25 | 887EB3CE1C43537E004B013E 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /ElasticViewAnimationTests/ElasticViewAnimationTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ElasticViewAnimationTests.m 3 | // ElasticViewAnimationTests 4 | // 5 | // Created by xp_mac on 16/1/11. 6 | // Copyright © 2016年 xp_mac. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ElasticViewAnimationTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation ElasticViewAnimationTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /ElasticViewAnimation/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /ElasticViewAnimationUITests/ElasticViewAnimationUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // ElasticViewAnimationUITests.m 3 | // ElasticViewAnimationUITests 4 | // 5 | // Created by xp_mac on 16/1/11. 6 | // Copyright © 2016年 xp_mac. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ElasticViewAnimationUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation ElasticViewAnimationUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /ElasticViewAnimation/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ElasticViewAnimation/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /ElasticViewAnimation/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /ElasticViewAnimation/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ElasticViewAnimation 4 | // 5 | // Created by xp_mac on 16/1/11. 6 | // Copyright © 2016年 xp_mac. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "MainViewController.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 20 | 21 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 22 | self.window.backgroundColor = [UIColor whiteColor]; 23 | 24 | MainViewController *mainVC = [[MainViewController alloc] init]; 25 | self.window.rootViewController = mainVC; 26 | [self.window makeKeyAndVisible]; 27 | 28 | return YES; 29 | } 30 | 31 | - (void)applicationWillResignActive:(UIApplication *)application { 32 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 33 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 34 | } 35 | 36 | - (void)applicationDidEnterBackground:(UIApplication *)application { 37 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 38 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 39 | } 40 | 41 | - (void)applicationWillEnterForeground:(UIApplication *)application { 42 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 43 | } 44 | 45 | - (void)applicationDidBecomeActive:(UIApplication *)application { 46 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 47 | } 48 | 49 | - (void)applicationWillTerminate:(UIApplication *)application { 50 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /ElasticViewAnimation.xcodeproj/xcuserdata/xp_mac.xcuserdatad/xcschemes/ElasticViewAnimation.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /ElasticViewAnimation/MainViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // ElasticViewAnimation 4 | // 5 | // Created by xp_mac on 16/1/11. 6 | // Copyright © 2016年 xp_mac. All rights reserved. 7 | // 8 | 9 | #import "MainViewController.h" 10 | #import "UIView+DegressCenter.h" 11 | 12 | @interface MainViewController () 13 | 14 | @property (nonatomic,strong) CAShapeLayer *shapeLayer; 15 | @property (nonatomic) CGFloat minimalHeight; 16 | @property (nonatomic) CGFloat maxWaveHeight; 17 | @property (nonatomic,strong) UIView *l3ControlPointView; 18 | @property (nonatomic,strong) UIView *l2ControlPointView; 19 | @property (nonatomic,strong) UIView *l1ControlPointView; 20 | @property (nonatomic,strong) UIView *cControlPointView; 21 | @property (nonatomic,strong) UIView *r1ControlPointView; 22 | @property (nonatomic,strong) UIView *r2ControlPointView; 23 | @property (nonatomic,strong) UIView *r3ControlPointView; 24 | @property (nonatomic,strong) CADisplayLink *displayLink; 25 | @property (nonatomic) BOOL animating; 26 | 27 | @end 28 | 29 | @implementation MainViewController 30 | 31 | - (void)viewDidLoad { 32 | [super viewDidLoad]; 33 | 34 | _minimalHeight = 50.0; //原始状态的高度 35 | _maxWaveHeight = 100.0; //最高状态的高度 36 | 37 | _animating = NO; 38 | self.view.userInteractionEnabled = YES; 39 | _displayLink.paused = YES; 40 | 41 | //矩形框 42 | _shapeLayer = [CAShapeLayer layer]; 43 | _shapeLayer.frame = CGRectMake(0, 0, self.view.bounds.size.width, _minimalHeight); 44 | _shapeLayer.fillColor = [UIColor colorWithRed:91/255.0 green:144/255.0 blue:212/255.0 alpha:1.0].CGColor; 45 | _shapeLayer.actions = @{@"position":[NSNull null],@"bounds":[NSNull null],@"path":[NSNull null]}; //关闭隐式动画,防止带来延迟效果 46 | [self.view.layer addSublayer:_shapeLayer]; 47 | 48 | //添加手势,可以改变frame的高度 49 | UIPanGestureRecognizer *panG = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(panGestureDidMove:)]; 50 | [self.view addGestureRecognizer:panG]; 51 | 52 | _l3ControlPointView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 3, 3)]; 53 | // _l3ControlPointView.backgroundColor = [UIColor redColor]; 54 | [self.view addSubview:_l3ControlPointView]; 55 | _l2ControlPointView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 3, 3)]; 56 | // _l2ControlPointView.backgroundColor = [UIColor greenColor]; 57 | [self.view addSubview:_l2ControlPointView]; 58 | _l1ControlPointView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 3, 3)]; 59 | // _l1ControlPointView.backgroundColor = [UIColor orangeColor]; 60 | [self.view addSubview:_l1ControlPointView]; 61 | _cControlPointView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 3, 3)]; 62 | // _cControlPointView.backgroundColor = [UIColor blueColor]; 63 | [self.view addSubview:_cControlPointView]; 64 | _r1ControlPointView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 3, 3)]; 65 | // _r1ControlPointView.backgroundColor = [UIColor orangeColor]; 66 | [self.view addSubview:_r1ControlPointView]; 67 | _r2ControlPointView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 3, 3)]; 68 | // _r2ControlPointView.backgroundColor = [UIColor purpleColor]; 69 | [self.view addSubview:_r2ControlPointView]; 70 | _r3ControlPointView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 3, 3)]; 71 | // _r3ControlPointView.backgroundColor = [UIColor whiteColor]; 72 | [self.view addSubview:_r3ControlPointView]; 73 | 74 | //布局控制点 75 | [self layoutControlPoints:_minimalHeight waveHeight:0.0 locationX:self.view.bounds.size.width/2]; 76 | [self updateShapeLayer]; 77 | 78 | _displayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(updateShapeLayer)]; 79 | [_displayLink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSDefaultRunLoopMode]; 80 | } 81 | 82 | - (void) panGestureDidMove:(UIPanGestureRecognizer *)pan 83 | { 84 | if (pan.state == UIGestureRecognizerStateEnded || pan.state == UIGestureRecognizerStateFailed || pan.state == UIGestureRecognizerStateCancelled) { 85 | 86 | CGFloat centerY = _minimalHeight; 87 | _animating = YES; 88 | 89 | //动画 90 | [UIView animateWithDuration:0.9 delay:0.0 usingSpringWithDamping:0.57 initialSpringVelocity:0.0 options:UIViewAnimationOptionCurveEaseIn animations:^{ 91 | CGPoint pointl3 = _l3ControlPointView.center; 92 | pointl3.y = centerY; 93 | _l3ControlPointView.center = pointl3; 94 | CGPoint pointl2 = _l2ControlPointView.center; 95 | pointl2.y = centerY; 96 | _l2ControlPointView.center = pointl2; 97 | CGPoint pointl1 = _l1ControlPointView.center; 98 | pointl1.y = centerY; 99 | _l1ControlPointView.center = pointl1; 100 | CGPoint pointc = _cControlPointView.center; 101 | pointc.y = centerY; 102 | _cControlPointView.center = pointc; 103 | CGPoint pointr1 = _r1ControlPointView.center; 104 | pointr1.y = centerY; 105 | _r1ControlPointView.center = pointr1; 106 | CGPoint pointr2 = _r2ControlPointView.center; 107 | pointr2.y = centerY; 108 | _r2ControlPointView.center = pointr2; 109 | CGPoint pointr3 = _r3ControlPointView.center; 110 | pointr3.y = centerY; 111 | _r3ControlPointView.center = pointr3; 112 | 113 | } completion:^(BOOL finished) { 114 | _animating = NO; 115 | }]; 116 | } 117 | else 118 | { 119 | CGFloat maxF = [pan translationInView:self.view].y; 120 | CGFloat additionalHeight = MAX(maxF, 0); 121 | NSLog(@"=========%f",maxF); 122 | 123 | CGFloat waveHeight = MIN(additionalHeight * 0.6, _maxWaveHeight); 124 | CGFloat baseHeight = _minimalHeight + additionalHeight - waveHeight; 125 | 126 | CGFloat locationX = [pan translationInView:self.view].x + pan.view.center.x; //视图上手指滑动的x坐标,也就是波浪的顶部 127 | NSLog(@"+++++++%f",locationX); 128 | 129 | if (maxF > 150) { 130 | 131 | } 132 | else 133 | { 134 | [self layoutControlPoints:baseHeight waveHeight:waveHeight locationX:locationX]; 135 | [self updateShapeLayer]; 136 | } 137 | } 138 | } 139 | 140 | - (void) layoutControlPoints:(CGFloat)baseHeight waveHeight:(CGFloat)waveHeight locationX:(CGFloat)locationX 141 | { 142 | CGFloat width = self.view.bounds.size.width; 143 | CGFloat minLeftX = MIN((locationX - width / 2.0) * 0.28, 0); 144 | CGFloat maxRightX = MAX(width + (locationX - width / 2.0) * 0.28, width); 145 | 146 | CGFloat leftPartWidth = locationX - minLeftX; 147 | CGFloat rightPartWidth = maxRightX - locationX; 148 | 149 | _l3ControlPointView.center = CGPointMake(minLeftX, baseHeight); 150 | _l2ControlPointView.center = CGPointMake(minLeftX + leftPartWidth*0.44, baseHeight); 151 | _l1ControlPointView.center = CGPointMake(minLeftX + leftPartWidth*0.71, baseHeight + waveHeight*0.64); 152 | _cControlPointView.center = CGPointMake(locationX, baseHeight + waveHeight*1.36); 153 | _r1ControlPointView.center = CGPointMake(maxRightX - rightPartWidth*0.71, baseHeight + waveHeight*0.64); 154 | _r2ControlPointView.center = CGPointMake(maxRightX - (rightPartWidth*0.44), baseHeight); 155 | _r3ControlPointView.center = CGPointMake(maxRightX, baseHeight); 156 | } 157 | 158 | - (void) updateShapeLayer 159 | { 160 | _shapeLayer.path = [self currentPath]; 161 | } 162 | 163 | - (CGPathRef )currentPath 164 | { 165 | CGFloat width = self.view.bounds.size.width; 166 | UIBezierPath *bezierPath = [UIBezierPath bezierPath]; 167 | [bezierPath moveToPoint:CGPointMake(0, 0)]; 168 | [bezierPath addLineToPoint:CGPointMake(0, [_l3ControlPointView usePresentationLayerIfPossible:_animating].y)]; 169 | [bezierPath addCurveToPoint:[_l1ControlPointView usePresentationLayerIfPossible:_animating] controlPoint1:[_l3ControlPointView usePresentationLayerIfPossible:_animating] controlPoint2:[_l2ControlPointView usePresentationLayerIfPossible:_animating]]; 170 | [bezierPath addCurveToPoint:[_r1ControlPointView usePresentationLayerIfPossible:_animating] controlPoint1:[_cControlPointView usePresentationLayerIfPossible:_animating] controlPoint2:[_r1ControlPointView usePresentationLayerIfPossible:_animating]]; 171 | [bezierPath addCurveToPoint:[_r3ControlPointView usePresentationLayerIfPossible:_animating] controlPoint1:[_r1ControlPointView usePresentationLayerIfPossible:_animating] controlPoint2:[_r2ControlPointView usePresentationLayerIfPossible:_animating]]; 172 | [bezierPath addLineToPoint:CGPointMake(width, 0.0)]; 173 | [bezierPath closePath]; 174 | 175 | return bezierPath.CGPath; 176 | } 177 | 178 | - (void)didReceiveMemoryWarning { 179 | [super didReceiveMemoryWarning]; 180 | // Dispose of any resources that can be recreated. 181 | } 182 | 183 | @end 184 | -------------------------------------------------------------------------------- /ElasticViewAnimation.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8843750B1C43542D00569553 /* UIView+DegressCenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 8843750A1C43542D00569553 /* UIView+DegressCenter.m */; }; 11 | 887EB3B01C43537E004B013E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 887EB3AF1C43537E004B013E /* main.m */; }; 12 | 887EB3B31C43537E004B013E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 887EB3B21C43537E004B013E /* AppDelegate.m */; }; 13 | 887EB3B61C43537E004B013E /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 887EB3B51C43537E004B013E /* MainViewController.m */; }; 14 | 887EB3B91C43537E004B013E /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 887EB3B71C43537E004B013E /* Main.storyboard */; }; 15 | 887EB3BB1C43537E004B013E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 887EB3BA1C43537E004B013E /* Assets.xcassets */; }; 16 | 887EB3BE1C43537E004B013E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 887EB3BC1C43537E004B013E /* LaunchScreen.storyboard */; }; 17 | 887EB3C91C43537E004B013E /* ElasticViewAnimationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 887EB3C81C43537E004B013E /* ElasticViewAnimationTests.m */; }; 18 | 887EB3D41C43537E004B013E /* ElasticViewAnimationUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 887EB3D31C43537E004B013E /* ElasticViewAnimationUITests.m */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXContainerItemProxy section */ 22 | 887EB3C51C43537E004B013E /* PBXContainerItemProxy */ = { 23 | isa = PBXContainerItemProxy; 24 | containerPortal = 887EB3A31C43537E004B013E /* Project object */; 25 | proxyType = 1; 26 | remoteGlobalIDString = 887EB3AA1C43537E004B013E; 27 | remoteInfo = ElasticViewAnimation; 28 | }; 29 | 887EB3D01C43537E004B013E /* PBXContainerItemProxy */ = { 30 | isa = PBXContainerItemProxy; 31 | containerPortal = 887EB3A31C43537E004B013E /* Project object */; 32 | proxyType = 1; 33 | remoteGlobalIDString = 887EB3AA1C43537E004B013E; 34 | remoteInfo = ElasticViewAnimation; 35 | }; 36 | /* End PBXContainerItemProxy section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 884375091C43542D00569553 /* UIView+DegressCenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+DegressCenter.h"; sourceTree = ""; }; 40 | 8843750A1C43542D00569553 /* UIView+DegressCenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+DegressCenter.m"; sourceTree = ""; }; 41 | 887EB3AB1C43537E004B013E /* ElasticViewAnimation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ElasticViewAnimation.app; sourceTree = BUILT_PRODUCTS_DIR; }; 42 | 887EB3AF1C43537E004B013E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 43 | 887EB3B11C43537E004B013E /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 44 | 887EB3B21C43537E004B013E /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 45 | 887EB3B41C43537E004B013E /* MainViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MainViewController.h; sourceTree = ""; }; 46 | 887EB3B51C43537E004B013E /* MainViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MainViewController.m; sourceTree = ""; }; 47 | 887EB3B81C43537E004B013E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 48 | 887EB3BA1C43537E004B013E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 49 | 887EB3BD1C43537E004B013E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 50 | 887EB3BF1C43537E004B013E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | 887EB3C41C43537E004B013E /* ElasticViewAnimationTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ElasticViewAnimationTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | 887EB3C81C43537E004B013E /* ElasticViewAnimationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ElasticViewAnimationTests.m; sourceTree = ""; }; 53 | 887EB3CA1C43537E004B013E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | 887EB3CF1C43537E004B013E /* ElasticViewAnimationUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = ElasticViewAnimationUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 55 | 887EB3D31C43537E004B013E /* ElasticViewAnimationUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ElasticViewAnimationUITests.m; sourceTree = ""; }; 56 | 887EB3D51C43537E004B013E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 57 | /* End PBXFileReference section */ 58 | 59 | /* Begin PBXFrameworksBuildPhase section */ 60 | 887EB3A81C43537E004B013E /* Frameworks */ = { 61 | isa = PBXFrameworksBuildPhase; 62 | buildActionMask = 2147483647; 63 | files = ( 64 | ); 65 | runOnlyForDeploymentPostprocessing = 0; 66 | }; 67 | 887EB3C11C43537E004B013E /* Frameworks */ = { 68 | isa = PBXFrameworksBuildPhase; 69 | buildActionMask = 2147483647; 70 | files = ( 71 | ); 72 | runOnlyForDeploymentPostprocessing = 0; 73 | }; 74 | 887EB3CC1C43537E004B013E /* Frameworks */ = { 75 | isa = PBXFrameworksBuildPhase; 76 | buildActionMask = 2147483647; 77 | files = ( 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | /* End PBXFrameworksBuildPhase section */ 82 | 83 | /* Begin PBXGroup section */ 84 | 887EB3A21C43537E004B013E = { 85 | isa = PBXGroup; 86 | children = ( 87 | 887EB3AD1C43537E004B013E /* ElasticViewAnimation */, 88 | 887EB3C71C43537E004B013E /* ElasticViewAnimationTests */, 89 | 887EB3D21C43537E004B013E /* ElasticViewAnimationUITests */, 90 | 887EB3AC1C43537E004B013E /* Products */, 91 | ); 92 | sourceTree = ""; 93 | }; 94 | 887EB3AC1C43537E004B013E /* Products */ = { 95 | isa = PBXGroup; 96 | children = ( 97 | 887EB3AB1C43537E004B013E /* ElasticViewAnimation.app */, 98 | 887EB3C41C43537E004B013E /* ElasticViewAnimationTests.xctest */, 99 | 887EB3CF1C43537E004B013E /* ElasticViewAnimationUITests.xctest */, 100 | ); 101 | name = Products; 102 | sourceTree = ""; 103 | }; 104 | 887EB3AD1C43537E004B013E /* ElasticViewAnimation */ = { 105 | isa = PBXGroup; 106 | children = ( 107 | 887EB3B11C43537E004B013E /* AppDelegate.h */, 108 | 887EB3B21C43537E004B013E /* AppDelegate.m */, 109 | 887EB3B41C43537E004B013E /* MainViewController.h */, 110 | 887EB3B51C43537E004B013E /* MainViewController.m */, 111 | 884375091C43542D00569553 /* UIView+DegressCenter.h */, 112 | 8843750A1C43542D00569553 /* UIView+DegressCenter.m */, 113 | 887EB3B71C43537E004B013E /* Main.storyboard */, 114 | 887EB3BA1C43537E004B013E /* Assets.xcassets */, 115 | 887EB3BC1C43537E004B013E /* LaunchScreen.storyboard */, 116 | 887EB3BF1C43537E004B013E /* Info.plist */, 117 | 887EB3AE1C43537E004B013E /* Supporting Files */, 118 | ); 119 | path = ElasticViewAnimation; 120 | sourceTree = ""; 121 | }; 122 | 887EB3AE1C43537E004B013E /* Supporting Files */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 887EB3AF1C43537E004B013E /* main.m */, 126 | ); 127 | name = "Supporting Files"; 128 | sourceTree = ""; 129 | }; 130 | 887EB3C71C43537E004B013E /* ElasticViewAnimationTests */ = { 131 | isa = PBXGroup; 132 | children = ( 133 | 887EB3C81C43537E004B013E /* ElasticViewAnimationTests.m */, 134 | 887EB3CA1C43537E004B013E /* Info.plist */, 135 | ); 136 | path = ElasticViewAnimationTests; 137 | sourceTree = ""; 138 | }; 139 | 887EB3D21C43537E004B013E /* ElasticViewAnimationUITests */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | 887EB3D31C43537E004B013E /* ElasticViewAnimationUITests.m */, 143 | 887EB3D51C43537E004B013E /* Info.plist */, 144 | ); 145 | path = ElasticViewAnimationUITests; 146 | sourceTree = ""; 147 | }; 148 | /* End PBXGroup section */ 149 | 150 | /* Begin PBXNativeTarget section */ 151 | 887EB3AA1C43537E004B013E /* ElasticViewAnimation */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = 887EB3D81C43537E004B013E /* Build configuration list for PBXNativeTarget "ElasticViewAnimation" */; 154 | buildPhases = ( 155 | 887EB3A71C43537E004B013E /* Sources */, 156 | 887EB3A81C43537E004B013E /* Frameworks */, 157 | 887EB3A91C43537E004B013E /* Resources */, 158 | ); 159 | buildRules = ( 160 | ); 161 | dependencies = ( 162 | ); 163 | name = ElasticViewAnimation; 164 | productName = ElasticViewAnimation; 165 | productReference = 887EB3AB1C43537E004B013E /* ElasticViewAnimation.app */; 166 | productType = "com.apple.product-type.application"; 167 | }; 168 | 887EB3C31C43537E004B013E /* ElasticViewAnimationTests */ = { 169 | isa = PBXNativeTarget; 170 | buildConfigurationList = 887EB3DB1C43537E004B013E /* Build configuration list for PBXNativeTarget "ElasticViewAnimationTests" */; 171 | buildPhases = ( 172 | 887EB3C01C43537E004B013E /* Sources */, 173 | 887EB3C11C43537E004B013E /* Frameworks */, 174 | 887EB3C21C43537E004B013E /* Resources */, 175 | ); 176 | buildRules = ( 177 | ); 178 | dependencies = ( 179 | 887EB3C61C43537E004B013E /* PBXTargetDependency */, 180 | ); 181 | name = ElasticViewAnimationTests; 182 | productName = ElasticViewAnimationTests; 183 | productReference = 887EB3C41C43537E004B013E /* ElasticViewAnimationTests.xctest */; 184 | productType = "com.apple.product-type.bundle.unit-test"; 185 | }; 186 | 887EB3CE1C43537E004B013E /* ElasticViewAnimationUITests */ = { 187 | isa = PBXNativeTarget; 188 | buildConfigurationList = 887EB3DE1C43537E004B013E /* Build configuration list for PBXNativeTarget "ElasticViewAnimationUITests" */; 189 | buildPhases = ( 190 | 887EB3CB1C43537E004B013E /* Sources */, 191 | 887EB3CC1C43537E004B013E /* Frameworks */, 192 | 887EB3CD1C43537E004B013E /* Resources */, 193 | ); 194 | buildRules = ( 195 | ); 196 | dependencies = ( 197 | 887EB3D11C43537E004B013E /* PBXTargetDependency */, 198 | ); 199 | name = ElasticViewAnimationUITests; 200 | productName = ElasticViewAnimationUITests; 201 | productReference = 887EB3CF1C43537E004B013E /* ElasticViewAnimationUITests.xctest */; 202 | productType = "com.apple.product-type.bundle.ui-testing"; 203 | }; 204 | /* End PBXNativeTarget section */ 205 | 206 | /* Begin PBXProject section */ 207 | 887EB3A31C43537E004B013E /* Project object */ = { 208 | isa = PBXProject; 209 | attributes = { 210 | LastUpgradeCheck = 0710; 211 | ORGANIZATIONNAME = xp_mac; 212 | TargetAttributes = { 213 | 887EB3AA1C43537E004B013E = { 214 | CreatedOnToolsVersion = 7.1.1; 215 | }; 216 | 887EB3C31C43537E004B013E = { 217 | CreatedOnToolsVersion = 7.1.1; 218 | DevelopmentTeam = Y42CU4L747; 219 | TestTargetID = 887EB3AA1C43537E004B013E; 220 | }; 221 | 887EB3CE1C43537E004B013E = { 222 | CreatedOnToolsVersion = 7.1.1; 223 | DevelopmentTeam = Y42CU4L747; 224 | TestTargetID = 887EB3AA1C43537E004B013E; 225 | }; 226 | }; 227 | }; 228 | buildConfigurationList = 887EB3A61C43537E004B013E /* Build configuration list for PBXProject "ElasticViewAnimation" */; 229 | compatibilityVersion = "Xcode 3.2"; 230 | developmentRegion = English; 231 | hasScannedForEncodings = 0; 232 | knownRegions = ( 233 | en, 234 | Base, 235 | ); 236 | mainGroup = 887EB3A21C43537E004B013E; 237 | productRefGroup = 887EB3AC1C43537E004B013E /* Products */; 238 | projectDirPath = ""; 239 | projectRoot = ""; 240 | targets = ( 241 | 887EB3AA1C43537E004B013E /* ElasticViewAnimation */, 242 | 887EB3C31C43537E004B013E /* ElasticViewAnimationTests */, 243 | 887EB3CE1C43537E004B013E /* ElasticViewAnimationUITests */, 244 | ); 245 | }; 246 | /* End PBXProject section */ 247 | 248 | /* Begin PBXResourcesBuildPhase section */ 249 | 887EB3A91C43537E004B013E /* Resources */ = { 250 | isa = PBXResourcesBuildPhase; 251 | buildActionMask = 2147483647; 252 | files = ( 253 | 887EB3BE1C43537E004B013E /* LaunchScreen.storyboard in Resources */, 254 | 887EB3BB1C43537E004B013E /* Assets.xcassets in Resources */, 255 | 887EB3B91C43537E004B013E /* Main.storyboard in Resources */, 256 | ); 257 | runOnlyForDeploymentPostprocessing = 0; 258 | }; 259 | 887EB3C21C43537E004B013E /* Resources */ = { 260 | isa = PBXResourcesBuildPhase; 261 | buildActionMask = 2147483647; 262 | files = ( 263 | ); 264 | runOnlyForDeploymentPostprocessing = 0; 265 | }; 266 | 887EB3CD1C43537E004B013E /* Resources */ = { 267 | isa = PBXResourcesBuildPhase; 268 | buildActionMask = 2147483647; 269 | files = ( 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | }; 273 | /* End PBXResourcesBuildPhase section */ 274 | 275 | /* Begin PBXSourcesBuildPhase section */ 276 | 887EB3A71C43537E004B013E /* Sources */ = { 277 | isa = PBXSourcesBuildPhase; 278 | buildActionMask = 2147483647; 279 | files = ( 280 | 887EB3B61C43537E004B013E /* MainViewController.m in Sources */, 281 | 887EB3B31C43537E004B013E /* AppDelegate.m in Sources */, 282 | 887EB3B01C43537E004B013E /* main.m in Sources */, 283 | 8843750B1C43542D00569553 /* UIView+DegressCenter.m in Sources */, 284 | ); 285 | runOnlyForDeploymentPostprocessing = 0; 286 | }; 287 | 887EB3C01C43537E004B013E /* Sources */ = { 288 | isa = PBXSourcesBuildPhase; 289 | buildActionMask = 2147483647; 290 | files = ( 291 | 887EB3C91C43537E004B013E /* ElasticViewAnimationTests.m in Sources */, 292 | ); 293 | runOnlyForDeploymentPostprocessing = 0; 294 | }; 295 | 887EB3CB1C43537E004B013E /* Sources */ = { 296 | isa = PBXSourcesBuildPhase; 297 | buildActionMask = 2147483647; 298 | files = ( 299 | 887EB3D41C43537E004B013E /* ElasticViewAnimationUITests.m in Sources */, 300 | ); 301 | runOnlyForDeploymentPostprocessing = 0; 302 | }; 303 | /* End PBXSourcesBuildPhase section */ 304 | 305 | /* Begin PBXTargetDependency section */ 306 | 887EB3C61C43537E004B013E /* PBXTargetDependency */ = { 307 | isa = PBXTargetDependency; 308 | target = 887EB3AA1C43537E004B013E /* ElasticViewAnimation */; 309 | targetProxy = 887EB3C51C43537E004B013E /* PBXContainerItemProxy */; 310 | }; 311 | 887EB3D11C43537E004B013E /* PBXTargetDependency */ = { 312 | isa = PBXTargetDependency; 313 | target = 887EB3AA1C43537E004B013E /* ElasticViewAnimation */; 314 | targetProxy = 887EB3D01C43537E004B013E /* PBXContainerItemProxy */; 315 | }; 316 | /* End PBXTargetDependency section */ 317 | 318 | /* Begin PBXVariantGroup section */ 319 | 887EB3B71C43537E004B013E /* Main.storyboard */ = { 320 | isa = PBXVariantGroup; 321 | children = ( 322 | 887EB3B81C43537E004B013E /* Base */, 323 | ); 324 | name = Main.storyboard; 325 | sourceTree = ""; 326 | }; 327 | 887EB3BC1C43537E004B013E /* LaunchScreen.storyboard */ = { 328 | isa = PBXVariantGroup; 329 | children = ( 330 | 887EB3BD1C43537E004B013E /* Base */, 331 | ); 332 | name = LaunchScreen.storyboard; 333 | sourceTree = ""; 334 | }; 335 | /* End PBXVariantGroup section */ 336 | 337 | /* Begin XCBuildConfiguration section */ 338 | 887EB3D61C43537E004B013E /* Debug */ = { 339 | isa = XCBuildConfiguration; 340 | buildSettings = { 341 | ALWAYS_SEARCH_USER_PATHS = NO; 342 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 343 | CLANG_CXX_LIBRARY = "libc++"; 344 | CLANG_ENABLE_MODULES = YES; 345 | CLANG_ENABLE_OBJC_ARC = YES; 346 | CLANG_WARN_BOOL_CONVERSION = YES; 347 | CLANG_WARN_CONSTANT_CONVERSION = YES; 348 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 349 | CLANG_WARN_EMPTY_BODY = YES; 350 | CLANG_WARN_ENUM_CONVERSION = YES; 351 | CLANG_WARN_INT_CONVERSION = YES; 352 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 353 | CLANG_WARN_UNREACHABLE_CODE = YES; 354 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 355 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 356 | COPY_PHASE_STRIP = NO; 357 | DEBUG_INFORMATION_FORMAT = dwarf; 358 | ENABLE_STRICT_OBJC_MSGSEND = YES; 359 | ENABLE_TESTABILITY = YES; 360 | GCC_C_LANGUAGE_STANDARD = gnu99; 361 | GCC_DYNAMIC_NO_PIC = NO; 362 | GCC_NO_COMMON_BLOCKS = YES; 363 | GCC_OPTIMIZATION_LEVEL = 0; 364 | GCC_PREPROCESSOR_DEFINITIONS = ( 365 | "DEBUG=1", 366 | "$(inherited)", 367 | ); 368 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 369 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 370 | GCC_WARN_UNDECLARED_SELECTOR = YES; 371 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 372 | GCC_WARN_UNUSED_FUNCTION = YES; 373 | GCC_WARN_UNUSED_VARIABLE = YES; 374 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 375 | MTL_ENABLE_DEBUG_INFO = YES; 376 | ONLY_ACTIVE_ARCH = YES; 377 | SDKROOT = iphoneos; 378 | TARGETED_DEVICE_FAMILY = "1,2"; 379 | }; 380 | name = Debug; 381 | }; 382 | 887EB3D71C43537E004B013E /* Release */ = { 383 | isa = XCBuildConfiguration; 384 | buildSettings = { 385 | ALWAYS_SEARCH_USER_PATHS = NO; 386 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 387 | CLANG_CXX_LIBRARY = "libc++"; 388 | CLANG_ENABLE_MODULES = YES; 389 | CLANG_ENABLE_OBJC_ARC = YES; 390 | CLANG_WARN_BOOL_CONVERSION = YES; 391 | CLANG_WARN_CONSTANT_CONVERSION = YES; 392 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 393 | CLANG_WARN_EMPTY_BODY = YES; 394 | CLANG_WARN_ENUM_CONVERSION = YES; 395 | CLANG_WARN_INT_CONVERSION = YES; 396 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 397 | CLANG_WARN_UNREACHABLE_CODE = YES; 398 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 399 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 400 | COPY_PHASE_STRIP = NO; 401 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 402 | ENABLE_NS_ASSERTIONS = NO; 403 | ENABLE_STRICT_OBJC_MSGSEND = YES; 404 | GCC_C_LANGUAGE_STANDARD = gnu99; 405 | GCC_NO_COMMON_BLOCKS = YES; 406 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 407 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 408 | GCC_WARN_UNDECLARED_SELECTOR = YES; 409 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 410 | GCC_WARN_UNUSED_FUNCTION = YES; 411 | GCC_WARN_UNUSED_VARIABLE = YES; 412 | IPHONEOS_DEPLOYMENT_TARGET = 9.1; 413 | MTL_ENABLE_DEBUG_INFO = NO; 414 | SDKROOT = iphoneos; 415 | TARGETED_DEVICE_FAMILY = "1,2"; 416 | VALIDATE_PRODUCT = YES; 417 | }; 418 | name = Release; 419 | }; 420 | 887EB3D91C43537E004B013E /* Debug */ = { 421 | isa = XCBuildConfiguration; 422 | buildSettings = { 423 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 424 | CODE_SIGN_IDENTITY = "iPhone Developer"; 425 | INFOPLIST_FILE = ElasticViewAnimation/Info.plist; 426 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 427 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 428 | PRODUCT_BUNDLE_IDENTIFIER = com.Animation.ElasticViewAnimation; 429 | PRODUCT_NAME = "$(TARGET_NAME)"; 430 | }; 431 | name = Debug; 432 | }; 433 | 887EB3DA1C43537E004B013E /* Release */ = { 434 | isa = XCBuildConfiguration; 435 | buildSettings = { 436 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 437 | CODE_SIGN_IDENTITY = "iPhone Developer"; 438 | INFOPLIST_FILE = ElasticViewAnimation/Info.plist; 439 | IPHONEOS_DEPLOYMENT_TARGET = 7.0; 440 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 441 | PRODUCT_BUNDLE_IDENTIFIER = com.Animation.ElasticViewAnimation; 442 | PRODUCT_NAME = "$(TARGET_NAME)"; 443 | }; 444 | name = Release; 445 | }; 446 | 887EB3DC1C43537E004B013E /* Debug */ = { 447 | isa = XCBuildConfiguration; 448 | buildSettings = { 449 | BUNDLE_LOADER = "$(TEST_HOST)"; 450 | INFOPLIST_FILE = ElasticViewAnimationTests/Info.plist; 451 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 452 | PRODUCT_BUNDLE_IDENTIFIER = com.Animation.ElasticViewAnimationTests; 453 | PRODUCT_NAME = "$(TARGET_NAME)"; 454 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ElasticViewAnimation.app/ElasticViewAnimation"; 455 | }; 456 | name = Debug; 457 | }; 458 | 887EB3DD1C43537E004B013E /* Release */ = { 459 | isa = XCBuildConfiguration; 460 | buildSettings = { 461 | BUNDLE_LOADER = "$(TEST_HOST)"; 462 | INFOPLIST_FILE = ElasticViewAnimationTests/Info.plist; 463 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 464 | PRODUCT_BUNDLE_IDENTIFIER = com.Animation.ElasticViewAnimationTests; 465 | PRODUCT_NAME = "$(TARGET_NAME)"; 466 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ElasticViewAnimation.app/ElasticViewAnimation"; 467 | }; 468 | name = Release; 469 | }; 470 | 887EB3DF1C43537E004B013E /* Debug */ = { 471 | isa = XCBuildConfiguration; 472 | buildSettings = { 473 | INFOPLIST_FILE = ElasticViewAnimationUITests/Info.plist; 474 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 475 | PRODUCT_BUNDLE_IDENTIFIER = com.Animation.ElasticViewAnimationUITests; 476 | PRODUCT_NAME = "$(TARGET_NAME)"; 477 | TEST_TARGET_NAME = ElasticViewAnimation; 478 | USES_XCTRUNNER = YES; 479 | }; 480 | name = Debug; 481 | }; 482 | 887EB3E01C43537E004B013E /* Release */ = { 483 | isa = XCBuildConfiguration; 484 | buildSettings = { 485 | INFOPLIST_FILE = ElasticViewAnimationUITests/Info.plist; 486 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 487 | PRODUCT_BUNDLE_IDENTIFIER = com.Animation.ElasticViewAnimationUITests; 488 | PRODUCT_NAME = "$(TARGET_NAME)"; 489 | TEST_TARGET_NAME = ElasticViewAnimation; 490 | USES_XCTRUNNER = YES; 491 | }; 492 | name = Release; 493 | }; 494 | /* End XCBuildConfiguration section */ 495 | 496 | /* Begin XCConfigurationList section */ 497 | 887EB3A61C43537E004B013E /* Build configuration list for PBXProject "ElasticViewAnimation" */ = { 498 | isa = XCConfigurationList; 499 | buildConfigurations = ( 500 | 887EB3D61C43537E004B013E /* Debug */, 501 | 887EB3D71C43537E004B013E /* Release */, 502 | ); 503 | defaultConfigurationIsVisible = 0; 504 | defaultConfigurationName = Release; 505 | }; 506 | 887EB3D81C43537E004B013E /* Build configuration list for PBXNativeTarget "ElasticViewAnimation" */ = { 507 | isa = XCConfigurationList; 508 | buildConfigurations = ( 509 | 887EB3D91C43537E004B013E /* Debug */, 510 | 887EB3DA1C43537E004B013E /* Release */, 511 | ); 512 | defaultConfigurationIsVisible = 0; 513 | defaultConfigurationName = Release; 514 | }; 515 | 887EB3DB1C43537E004B013E /* Build configuration list for PBXNativeTarget "ElasticViewAnimationTests" */ = { 516 | isa = XCConfigurationList; 517 | buildConfigurations = ( 518 | 887EB3DC1C43537E004B013E /* Debug */, 519 | 887EB3DD1C43537E004B013E /* Release */, 520 | ); 521 | defaultConfigurationIsVisible = 0; 522 | defaultConfigurationName = Release; 523 | }; 524 | 887EB3DE1C43537E004B013E /* Build configuration list for PBXNativeTarget "ElasticViewAnimationUITests" */ = { 525 | isa = XCConfigurationList; 526 | buildConfigurations = ( 527 | 887EB3DF1C43537E004B013E /* Debug */, 528 | 887EB3E01C43537E004B013E /* Release */, 529 | ); 530 | defaultConfigurationIsVisible = 0; 531 | defaultConfigurationName = Release; 532 | }; 533 | /* End XCConfigurationList section */ 534 | }; 535 | rootObject = 887EB3A31C43537E004B013E /* Project object */; 536 | } 537 | --------------------------------------------------------------------------------