├── .DS_Store
├── logo_.png
├── water.gif
├── KYWaterWaveAnimation
├── Images.xcassets
│ ├── fish.imageset
│ │ ├── fish.png
│ │ ├── fish-1.png
│ │ ├── fish-2.png
│ │ └── Contents.json
│ ├── ship.imageset
│ │ ├── pc78yM9Ki.png
│ │ ├── pc78yM9Ki-1.png
│ │ ├── pc78yM9Ki-2.png
│ │ └── Contents.json
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── ViewController.h
├── AppDelegate.h
├── main.m
├── KYWaterWaveView.h
├── ViewController.m
├── Info.plist
├── AppDelegate.m
├── Base.lproj
│ ├── Main.storyboard
│ └── LaunchScreen.xib
└── KYWaterWaveView.m
├── KYWaterWaveAnimation.xcodeproj
├── xcuserdata
│ └── KittenYang.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── KYWaterWaveAnimation.xcscheme
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── KittenYang.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── project.pbxproj
├── KYWaterWaveView
├── KYWaterWaveView.h
└── KYWaterWaveView.m
├── KYWaterWaveAnimationTests
├── Info.plist
└── KYWaterWaveAnimationTests.m
├── LICENSE
├── README.md
└── KYWaterWaveView.podspec
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYWaterWaveView/HEAD/.DS_Store
--------------------------------------------------------------------------------
/logo_.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYWaterWaveView/HEAD/logo_.png
--------------------------------------------------------------------------------
/water.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYWaterWaveView/HEAD/water.gif
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/Images.xcassets/fish.imageset/fish.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYWaterWaveView/HEAD/KYWaterWaveAnimation/Images.xcassets/fish.imageset/fish.png
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/Images.xcassets/fish.imageset/fish-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYWaterWaveView/HEAD/KYWaterWaveAnimation/Images.xcassets/fish.imageset/fish-1.png
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/Images.xcassets/fish.imageset/fish-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYWaterWaveView/HEAD/KYWaterWaveAnimation/Images.xcassets/fish.imageset/fish-2.png
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/Images.xcassets/ship.imageset/pc78yM9Ki.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYWaterWaveView/HEAD/KYWaterWaveAnimation/Images.xcassets/ship.imageset/pc78yM9Ki.png
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/Images.xcassets/ship.imageset/pc78yM9Ki-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYWaterWaveView/HEAD/KYWaterWaveAnimation/Images.xcassets/ship.imageset/pc78yM9Ki-1.png
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/Images.xcassets/ship.imageset/pc78yM9Ki-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYWaterWaveView/HEAD/KYWaterWaveAnimation/Images.xcassets/ship.imageset/pc78yM9Ki-2.png
--------------------------------------------------------------------------------
/KYWaterWaveAnimation.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/KYWaterWaveAnimation.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/KYWaterWaveAnimation.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/KittenYang/KYWaterWaveView/HEAD/KYWaterWaveAnimation.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // KYWaterWaveAnimation
4 | //
5 | // Created by Kitten Yang on 3/16/15.
6 | // Copyright (c) 2015 Kitten Yang. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // KYWaterWaveAnimation
4 | //
5 | // Created by Kitten Yang on 3/16/15.
6 | // Copyright (c) 2015 Kitten Yang. 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 |
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // KYWaterWaveAnimation
4 | //
5 | // Created by Kitten Yang on 3/16/15.
6 | // Copyright (c) 2015 Kitten Yang. 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 |
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/Images.xcassets/fish.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "fish-1.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "fish.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "fish-2.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/Images.xcassets/ship.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "scale" : "1x",
6 | "filename" : "pc78yM9Ki-1.png"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x",
11 | "filename" : "pc78yM9Ki.png"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "scale" : "3x",
16 | "filename" : "pc78yM9Ki-2.png"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/KYWaterWaveView.h:
--------------------------------------------------------------------------------
1 | //
2 | // KYWaterWaveView.h
3 | // KYWaterWaveAnimation
4 | //
5 | // Created by Kitten Yang on 3/16/15.
6 | // Copyright (c) 2015 Kitten Yang. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface KYWaterWaveView : UIView
12 |
13 | /**
14 | * The speed of wave 波浪的快慢
15 | */
16 | @property (nonatomic,assign)CGFloat waveSpeed;
17 |
18 | /**
19 | * The amplitude of wave 波浪的震荡幅度
20 | */
21 | @property (nonatomic,assign)CGFloat waveAmplitude; // 波浪的震荡幅度
22 |
23 | /**
24 | * Start waving
25 | */
26 | - (void)wave;
27 |
28 | /**
29 | * Stop waving
30 | */
31 | - (void)stop;
32 |
33 | @end
34 |
--------------------------------------------------------------------------------
/KYWaterWaveView/KYWaterWaveView.h:
--------------------------------------------------------------------------------
1 | //
2 | // KYWaterWaveView.h
3 | // KYWaterWaveAnimation
4 | //
5 | // Created by Kitten Yang on 3/16/15.
6 | // Copyright (c) 2015 Kitten Yang. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #ifndef MB_STRONG
12 | #if __has_feature(objc_arc)
13 | #define MB_STRONG strong
14 | #else
15 | #define MB_STRONG retain
16 | #endif
17 | #endif
18 |
19 | @interface KYWaterWaveView : UIView
20 |
21 | @property (nonatomic, assign) CGFloat waveSpeed; // Default as 6
22 | @property (nonatomic, assign) CGFloat waveAmplitude; // Default as 6
23 | @property (nonatomic, MB_STRONG) UIColor *waveColor; // Default as [UIColor blueColor]
24 |
25 | - (void)wave;
26 | - (void)stop;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/KYWaterWaveAnimation.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | KYWaterWaveAnimation.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 5FA24B481AB70773000E79BF
16 |
17 | primary
18 |
19 |
20 | 5FA24B611AB70773000E79BF
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/Images.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 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/KYWaterWaveAnimationTests/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.$(PRODUCT_NAME:rfc1034identifier)
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 |
--------------------------------------------------------------------------------
/KYWaterWaveAnimationTests/KYWaterWaveAnimationTests.m:
--------------------------------------------------------------------------------
1 | //
2 | // KYWaterWaveAnimationTests.m
3 | // KYWaterWaveAnimationTests
4 | //
5 | // Created by Kitten Yang on 3/16/15.
6 | // Copyright (c) 2015 Kitten Yang. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface KYWaterWaveAnimationTests : XCTestCase
13 |
14 | @end
15 |
16 | @implementation KYWaterWaveAnimationTests
17 |
18 | - (void)setUp {
19 | [super setUp];
20 | // Put setup code here. This method is called before the invocation of each test method in the class.
21 | }
22 |
23 | - (void)tearDown {
24 | // Put teardown code here. This method is called after the invocation of each test method in the class.
25 | [super tearDown];
26 | }
27 |
28 | - (void)testExample {
29 | // This is an example of a functional test case.
30 | XCTAssert(YES, @"Pass");
31 | }
32 |
33 | - (void)testPerformanceExample {
34 | // This is an example of a performance test case.
35 | [self measureBlock:^{
36 | // Put the code you want to measure the time of here.
37 | }];
38 | }
39 |
40 | @end
41 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 KittenYang
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // KYWaterWaveAnimation
4 | //
5 | // Created by Kitten Yang on 3/16/15.
6 | // Copyright (c) 2015 Kitten Yang. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 | #import "KYWaterWaveView.h"
11 |
12 |
13 | @interface ViewController()
14 | @property (strong, nonatomic) IBOutlet KYWaterWaveView *waterViewXib;
15 |
16 | @end
17 |
18 | @implementation ViewController{
19 | KYWaterWaveView *waterView;
20 | }
21 |
22 |
23 | - (void)viewDidLoad {
24 | [super viewDidLoad];
25 | // waterView = [[KYWaterWaveView alloc]initWithFrame:CGRectMake(0, 50, 50, 50)];
26 | // [self.view addSubview:waterView];
27 | // waterView.layer.cornerRadius = waterView.frame.size.width / 2;
28 | // waterView.waveSpeed = 6.0f;
29 | // waterView.waveAmplitude = 3.0f;
30 | // [waterView wave];
31 |
32 | // self.waterViewXib.layer.cornerRadius = self.waterViewXib.frame.size.width / 2;
33 | self.waterViewXib.waveSpeed = 6.0f;
34 | self.waterViewXib.waveAmplitude = 6.0f;
35 | [self.waterViewXib wave];
36 |
37 | }
38 |
39 | - (void)didReceiveMemoryWarning {
40 | [super didReceiveMemoryWarning];
41 | // Dispose of any resources that can be recreated.
42 | }
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | com.$(PRODUCT_NAME:rfc1034identifier)
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 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 
7 | 
8 | 
9 |
10 |
11 | ### 一个内置波浪动画的UIView。
12 | #### A view with water wave animation inside.
13 |
14 | 
15 |
16 |
17 | ##Installation
18 |
19 | `pod 'KYWaterWaveView', '~> 1.1.0'`
20 |
21 | ## Usage
22 |
23 | You can use code or xib to create;
24 | Then set the properties;
25 |
26 | ```objective-c
27 | @property (nonatomic, assign) CGFloat waveSpeed; // Default as 6
28 | @property (nonatomic, assign) CGFloat waveAmplitude; // Default as 6
29 | ```
30 |
31 | Most importantly, do not forget to call `[waterView wave]`;
32 |
33 | When you need to stop the wave,just call `[waterView stop]`;
34 |
35 |
36 |
37 | ##License
38 | The MIT License (MIT)
39 |
40 | Copyright (c) 2015 KittenYang
41 |
42 | Permission is hereby granted, free of charge, to any person obtaining a copy
43 | of this software and associated documentation files (the "Software"), to deal
44 | in the Software without restriction, including without limitation the rights
45 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
46 | copies of the Software, and to permit persons to whom the Software is
47 | furnished to do so, subject to the following conditions:
48 |
49 | The above copyright notice and this permission notice shall be included in all
50 | copies or substantial portions of the Software.
51 |
52 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
53 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
54 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
55 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
56 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
57 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
58 | SOFTWARE.
59 |
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // KYWaterWaveAnimation
4 | //
5 | // Created by Kitten Yang on 3/16/15.
6 | // Copyright (c) 2015 Kitten Yang. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 |
11 | @interface AppDelegate ()
12 |
13 | @end
14 |
15 | @implementation AppDelegate
16 |
17 |
18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19 | // Override point for customization after application launch.
20 | return YES;
21 | }
22 |
23 | - (void)applicationWillResignActive:(UIApplication *)application {
24 | // 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.
25 | // 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.
26 | }
27 |
28 | - (void)applicationDidEnterBackground:(UIApplication *)application {
29 | // 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.
30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
31 | }
32 |
33 | - (void)applicationWillEnterForeground:(UIApplication *)application {
34 | // 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.
35 | }
36 |
37 | - (void)applicationDidBecomeActive:(UIApplication *)application {
38 | // 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.
39 | }
40 |
41 | - (void)applicationWillTerminate:(UIApplication *)application {
42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/KYWaterWaveView/KYWaterWaveView.m:
--------------------------------------------------------------------------------
1 | //
2 | // KYWaterWaveView.m
3 | // KYWaterWaveAnimation
4 | //
5 | // Created by Kitten Yang on 3/16/15.
6 | // Copyright (c) 2015 Kitten Yang. All rights reserved.
7 | //
8 |
9 | #import "KYWaterWaveView.h"
10 |
11 |
12 | @interface KYWaterWaveView()
13 |
14 |
15 | @end
16 |
17 | @implementation KYWaterWaveView{
18 | CGFloat _waterWaveHeight;
19 | CGFloat _waterWaveWidth;
20 | CGFloat _offsetX;
21 |
22 | CADisplayLink *_waveDisplaylink;
23 | CAShapeLayer *_waveLayer;
24 |
25 | }
26 |
27 | - (void)_initWithFrame:(CGRect)frame {
28 | self.backgroundColor = [UIColor clearColor];
29 | self.layer.masksToBounds = YES;
30 | _waterWaveHeight = frame.size.height / 2;
31 | _waterWaveWidth = frame.size.width;
32 |
33 | self.waveAmplitude = 6;
34 | self.waveSpeed = 6;
35 | self.waveColor = [UIColor blueColor];
36 | }
37 |
38 | - (id)initWithFrame:(CGRect)frame {
39 | self = [super initWithFrame:frame];
40 | if (self) {
41 | [self _initWithFrame:frame];
42 | }
43 |
44 | return self;
45 | }
46 |
47 | - (id)initWithCoder:(NSCoder *)aDecoder {
48 | self = [super initWithCoder:aDecoder];
49 | if (self) {
50 | [self _initWithFrame:self.frame];
51 | }
52 |
53 | return self;
54 | }
55 |
56 | - (void)wave {
57 | _waveLayer = [CAShapeLayer layer];
58 | _waveLayer.fillColor = self.waveColor.CGColor;
59 | [self.layer addSublayer:_waveLayer];
60 | _waveDisplaylink = [CADisplayLink displayLinkWithTarget:self selector:@selector(getCurrentWave:)];
61 | [_waveDisplaylink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
62 |
63 | }
64 |
65 | - (void)getCurrentWave:(CADisplayLink *)displayLink {
66 | _offsetX += self.waveSpeed;
67 | CGPathRef path =[self getgetCurrentWavePath];
68 | _waveLayer.path = path;
69 | if (path != NULL) {
70 | CGPathRelease(path);
71 | path = NULL;
72 | }
73 | }
74 |
75 | - (CGPathRef)getgetCurrentWavePath {
76 | CGMutablePathRef path = CGPathCreateMutable();
77 | CGPathMoveToPoint(path, nil, 0, _waterWaveHeight);
78 | CGFloat y = 0.0f;
79 | for (float x = 0.0f; x <= _waterWaveWidth ; x++) {
80 | y = self.waveAmplitude* sinf((360/_waterWaveWidth) *(x * M_PI / 180) - _offsetX * M_PI / 180) + _waterWaveHeight;
81 | CGPathAddLineToPoint(path, nil, x, y);
82 | }
83 |
84 | CGPathAddLineToPoint(path, nil, _waterWaveWidth, self.frame.size.height);
85 | CGPathAddLineToPoint(path, nil, 0, self.frame.size.height);
86 | CGPathCloseSubpath(path);
87 |
88 | return path;
89 | }
90 |
91 | - (void)stop {
92 | [_waveLayer removeFromSuperlayer];
93 | [_waveDisplaylink invalidate];
94 | _waveDisplaylink = nil;
95 | }
96 |
97 |
98 | @end
99 |
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/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 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/Base.lproj/LaunchScreen.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
20 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/KYWaterWaveAnimation.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcschemes/KYWaterWaveAnimation.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
29 |
35 |
36 |
37 |
38 |
39 |
44 |
45 |
47 |
53 |
54 |
55 |
56 |
57 |
63 |
64 |
65 |
66 |
75 |
77 |
83 |
84 |
85 |
86 |
87 |
88 |
94 |
96 |
102 |
103 |
104 |
105 |
107 |
108 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/KYWaterWaveView.podspec:
--------------------------------------------------------------------------------
1 | #
2 | # Be sure to run `pod spec lint KYWaterWaveView.podspec' to ensure this is a
3 | # valid spec and to remove all comments including this before submitting the spec.
4 | #
5 | # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
6 | # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
7 | #
8 |
9 | Pod::Spec.new do |s|
10 |
11 | # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
12 | #
13 | # These will help people to find your library, and whilst it
14 | # can feel like a chore to fill in it's definitely to your advantage. The
15 | # summary should be tweet-length, and the description more in depth.
16 | #
17 |
18 | s.name = "KYWaterWaveView"
19 | s.version = "1.1.0"
20 | s.summary = "波浪动画 wave animation"
21 |
22 | s.description = <<-DESC
23 | 实现波浪正弦动画并带有小鱼跳跃溅起水花。A view with water wave animation inside.
24 | DESC
25 |
26 | s.homepage = "https://github.com/KittenYang/KYWaterWaveView"
27 | # s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
28 |
29 |
30 | # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
31 | #
32 | # Licensing your code is important. See http://choosealicense.com for more info.
33 | # CocoaPods will detect a license file if there is a named LICENSE*
34 | # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
35 | #
36 |
37 | s.license = "MIT"
38 | # s.license = { :type => "MIT", :file => "FILE_LICENSE" }
39 |
40 |
41 | # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
42 | #
43 | # Specify the authors of the library, with email addresses. Email addresses
44 | # of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
45 | # accepts just a name if you'd rather not provide an email address.
46 | #
47 | # Specify a social_media_url where others can refer to, for example a twitter
48 | # profile URL.
49 | #
50 |
51 | s.author = { "KittenYang" => "kittenyang@icloud.com" }
52 | # Or just: s.author = "KittenYang"
53 | # s.authors = { "KittenYang" => "kittenyang@icloud.com" }
54 | # s.social_media_url = "http://twitter.com/KittenYang"
55 |
56 | # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
57 | #
58 | # If this Pod runs only on iOS or OS X, then specify the platform and
59 | # the deployment target. You can optionally include the target after the platform.
60 | #
61 |
62 | s.platform = :ios
63 | # s.platform = :ios, "5.0"
64 |
65 | # When using multiple platforms
66 | # s.ios.deployment_target = "5.0"
67 | # s.osx.deployment_target = "10.7"
68 |
69 |
70 | # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
71 | #
72 | # Specify the location from where the source should be retrieved.
73 | # Supports git, hg, bzr, svn and HTTP.
74 | #
75 |
76 | s.source = { :git => "https://github.com/KittenYang/KYWaterWaveView.git", :tag => s.version.to_s }
77 |
78 |
79 | # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
80 | #
81 | # CocoaPods is smart about how it includes source code. For source files
82 | # giving a folder will include any swift, h, m, mm, c & cpp files.
83 | # For header files it will include any header in the folder.
84 | # Not including the public_header_files will make all headers public.
85 | #
86 |
87 | s.source_files = "KYWaterWaveView/*.{h,m}"
88 | #s.exclude_files = "Classes/Exclude"
89 |
90 | # s.public_header_files = "Classes/**/*.h"
91 |
92 |
93 | # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
94 | #
95 | # A list of resources included with the Pod. These are copied into the
96 | # target bundle with a build phase script. Anything else will be cleaned.
97 | # You can preserve files from being cleaned, please don't preserve
98 | # non-essential files like tests, examples and documentation.
99 | #
100 |
101 | # s.resource = "icon.png"
102 | # s.resources = "Resources/*.png"
103 |
104 | # s.preserve_paths = "FilesToSave", "MoreFilesToSave"
105 |
106 |
107 | # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
108 | #
109 | # Link your library with frameworks, or libraries. Libraries do not include
110 | # the lib prefix of their name.
111 | #
112 |
113 | s.framework = "Foundation","UIKit"
114 | # s.frameworks = "SomeFramework", "AnotherFramework"
115 |
116 | # s.library = "iconv"
117 | # s.libraries = "iconv", "xml2"
118 |
119 |
120 | # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
121 | #
122 | # If your library depends on compiler flags you can set them in the xcconfig hash
123 | # where they will only apply to your library. If you depend on other Podspecs
124 | # you can include multiple dependencies to ensure it works.
125 |
126 | s.requires_arc = true
127 |
128 | # s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
129 | # s.dependency "JSONKit", "~> 1.4"
130 |
131 | end
132 |
--------------------------------------------------------------------------------
/KYWaterWaveAnimation/KYWaterWaveView.m:
--------------------------------------------------------------------------------
1 | //
2 | // KYWaterWaveView.m
3 | // KYWaterWaveAnimation
4 | //
5 | // Created by Kitten Yang on 3/16/15.
6 | // Copyright (c) 2015 Kitten Yang. All rights reserved.
7 | //
8 |
9 | #define pathPadding 30
10 |
11 | #import "KYWaterWaveView.h"
12 |
13 |
14 |
15 | @interface KYWaterWaveView()
16 |
17 | @property (nonatomic, strong) UIImageView *fish;
18 |
19 | @end
20 |
21 | @implementation KYWaterWaveView{
22 | CALayer *l;
23 |
24 | BOOL fishFirstColl;
25 | CGFloat waterWaveHeight;
26 | CGFloat waterWaveWidth;
27 | CGFloat offsetX;
28 |
29 | CADisplayLink *waveDisplaylink;
30 | CAShapeLayer *waveLayer;
31 | UIBezierPath *waveBoundaryPath;
32 |
33 | UIView *dropView;;
34 | UIView *dropView2;
35 | UIView *dropView3;
36 | UIImageView *boot;
37 | UIDynamicAnimator *animator;
38 | UIPushBehavior *push;
39 | UIGravityBehavior * grav;
40 | UICollisionBehavior *coll;
41 | }
42 |
43 | - (id)initWithFrame:(CGRect)frame {
44 | self = [super initWithFrame:frame];
45 | if (self) {
46 | self.backgroundColor = [UIColor clearColor];
47 | self.layer.masksToBounds = YES;
48 | waterWaveHeight = frame.size.height / 2;
49 | waterWaveWidth = frame.size.width;
50 | }
51 |
52 | return self;
53 | }
54 |
55 | - (id)initWithCoder:(NSCoder *)aDecoder {
56 | self = [super initWithCoder:aDecoder];
57 | if (self) {
58 | self.backgroundColor = [UIColor clearColor];
59 | self.layer.masksToBounds = YES;
60 | waterWaveHeight = self.frame.size.height / 2;
61 | waterWaveWidth = self.frame.size.width;
62 |
63 | }
64 | return self;
65 | }
66 |
67 | #pragma mark - public
68 | - (void)wave {
69 | waveBoundaryPath = [UIBezierPath bezierPath];
70 |
71 | waveLayer = [CAShapeLayer layer];
72 | waveLayer.fillColor = [UIColor colorWithRed:0 green:0.722 blue:1 alpha:1].CGColor;
73 | [self.layer addSublayer:waveLayer];
74 | waveDisplaylink = [CADisplayLink displayLinkWithTarget:self selector:@selector(getCurrentWave:)];
75 | [waveDisplaylink addToRunLoop:[NSRunLoop mainRunLoop] forMode:NSRunLoopCommonModes];
76 |
77 | boot = [[UIImageView alloc]initWithFrame:CGRectMake(20,12 ,20,20 )];
78 | boot.tag = 100;
79 | boot.backgroundColor = [UIColor clearColor];
80 | boot.image = [UIImage imageNamed:@"ship"];
81 | [self addSubview:boot];
82 |
83 | animator = [[UIDynamicAnimator alloc]initWithReferenceView:self];
84 | NSArray *items = @[boot];
85 | grav = [[UIGravityBehavior alloc]initWithItems:items];
86 | [animator addBehavior:grav];
87 |
88 | coll = [[UICollisionBehavior alloc]initWithItems:items];
89 | coll.collisionDelegate = self;
90 | [animator addBehavior:coll];
91 |
92 | [NSTimer scheduledTimerWithTimeInterval:3.0f target:self selector:@selector(fishJump) userInfo:nil repeats:YES];
93 | }
94 |
95 | - (void)stop {
96 | [waveDisplaylink invalidate];
97 | waveDisplaylink = nil;
98 | }
99 |
100 | #pragma mark - helper
101 | - (void)getCurrentWave:(CADisplayLink *)displayLink {
102 | [coll removeAllBoundaries];
103 | offsetX += self.waveSpeed;
104 | waveBoundaryPath = [self getgetCurrentWavePath];
105 | waveLayer.path = waveBoundaryPath.CGPath;
106 |
107 | [coll addBoundaryWithIdentifier:@"waveBoundary" forPath:waveBoundaryPath];
108 | }
109 |
110 | - (UIBezierPath *)getgetCurrentWavePath {
111 | UIBezierPath *p = [UIBezierPath bezierPath];
112 | CGMutablePathRef path = CGPathCreateMutable();
113 | CGPathMoveToPoint(path, nil, 0, waterWaveHeight);
114 | CGFloat y = 0.0f;
115 | for (float x = 0.0f; x <= waterWaveWidth ; x++) {
116 | y = self.waveAmplitude* sinf((360/waterWaveWidth) *(x * M_PI / 180) - offsetX * M_PI / 180) + waterWaveHeight;
117 | CGPathAddLineToPoint(path, nil, x, y);
118 | }
119 |
120 | CGPathAddLineToPoint(path, nil, waterWaveWidth, self.frame.size.height);
121 | CGPathAddLineToPoint(path, nil, 0, self.frame.size.height);
122 | CGPathCloseSubpath(path);
123 |
124 | p.CGPath = path;
125 | CGPathRelease(path);
126 | return p;
127 | }
128 |
129 | - (void)fishJump {
130 | self.fish.hidden = NO;
131 | fishFirstColl = NO;
132 | if (self.fish == nil) {
133 | _fish = [[UIImageView alloc]initWithFrame:CGRectZero];
134 | _fish.image = [UIImage imageNamed:@"fish"];
135 | _fish.tag = 101;
136 | _fish.backgroundColor = [UIColor clearColor];
137 | [self addSubview:_fish];
138 | }
139 |
140 | self.fish.frame = CGRectMake(waterWaveWidth - pathPadding - 30,waterWaveHeight - 15, 30, 30);
141 |
142 | UIBezierPath *trackPath = [UIBezierPath bezierPath];
143 | CGPoint startP = CGPointMake(pathPadding+_fish.frame.size.width / 2, _fish.center.y);
144 | [trackPath moveToPoint:startP];
145 | [trackPath addQuadCurveToPoint:_fish.center controlPoint:CGPointMake((_fish.center.x - startP.x) / 2 + startP.x, _fish.center.y -60)];
146 |
147 | CAKeyframeAnimation *fishAnim = [CAKeyframeAnimation animationWithKeyPath:@"position"];
148 | fishAnim.path = trackPath.CGPath;
149 | fishAnim.rotationMode = kCAAnimationRotateAuto;
150 | fishAnim.timingFunction = [CAMediaTimingFunction functionWithControlPoints:0.1 :0.4 :0.9:0.6];
151 | fishAnim.delegate = self;
152 | fishAnim.duration = 1;
153 | fishAnim.removedOnCompletion = NO;
154 | fishAnim.fillMode = kCAFillModeForwards;
155 | [_fish.layer addAnimation:fishAnim forKey:@"fishAnim"];
156 |
157 | animator = [[UIDynamicAnimator alloc]initWithReferenceView:self];
158 | NSArray *items = @[boot];
159 | grav = [[UIGravityBehavior alloc]initWithItems:items];
160 | [animator addBehavior:grav];
161 |
162 | coll = [[UICollisionBehavior alloc]initWithItems:items];
163 | coll.collisionDelegate = self;
164 | [animator addBehavior:coll];
165 | }
166 |
167 | - (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag {
168 | if (anim == [dropView.layer animationForKey:@"dropAnim"]) {
169 | [dropView.layer removeAllAnimations];
170 | [dropView2.layer removeAllAnimations];
171 | [dropView3.layer removeAllAnimations];
172 | [grav addItem:dropView];
173 | [grav addItem:dropView2];
174 | [grav addItem:dropView3];
175 | }else if (anim == [_fish.layer animationForKey:@"fishAnim"]){
176 | [_fish.layer removeAllAnimations];
177 | [grav addItem:_fish];
178 | [coll addItem:_fish];
179 | }
180 | }
181 |
182 | - (void)collisionBehavior:(UICollisionBehavior*)behavior beganContactForItem:(id )item withBoundaryIdentifier:(id )identifier atPoint:(CGPoint)p {
183 |
184 | UIView *view = (UIView *)item;
185 | if (view.tag == 101 && !fishFirstColl) {
186 | self.fish.hidden = YES;
187 | fishFirstColl = YES;
188 |
189 | //第一个水滴
190 | if (dropView == nil) {
191 | dropView = [[UIView alloc]initWithFrame:CGRectZero];
192 | [self addSubview:dropView];
193 | dropView.backgroundColor = [UIColor colorWithRed:0 green:0.722 blue:1 alpha:1];
194 | }
195 | dropView.center = CGPointMake(p.x - 40, p.y);
196 | dropView.bounds = CGRectMake(0, 0, 5, 5);
197 | dropView.layer.cornerRadius = dropView.frame.size.width / 2;
198 |
199 | UIBezierPath *dropPath = [UIBezierPath bezierPath];
200 | [dropPath moveToPoint:p];
201 | [dropPath addQuadCurveToPoint:dropView.center controlPoint:CGPointMake((p.x - dropView.center.x) / 2 + dropView.center.x, p.y - 30)];
202 |
203 | CAKeyframeAnimation *dropAnim = [CAKeyframeAnimation animationWithKeyPath:@"position"];
204 | dropAnim.path = dropPath.CGPath;
205 | dropAnim.duration = 0.5f;
206 | dropAnim.timingFunction = [CAMediaTimingFunction functionWithControlPoints:0.1 :0.4 :0.9:0.6];
207 | dropAnim.delegate = self;
208 | dropAnim.removedOnCompletion = NO;
209 | dropAnim.fillMode = kCAFillModeForwards;
210 | [dropView.layer addAnimation:dropAnim forKey:@"dropAnim"];
211 |
212 |
213 | //第二个水滴
214 | if (dropView2 == nil) {
215 | dropView2 = [[UIView alloc]initWithFrame:CGRectZero];
216 | dropView2.backgroundColor = [UIColor colorWithRed:0 green:0.722 blue:1 alpha:1];
217 | [self addSubview:dropView2];
218 | }
219 | dropView2.center = CGPointMake(p.x - 50, p.y);
220 | dropView2.bounds = CGRectMake(0, 0, 5, 5);
221 | dropView2.layer.cornerRadius = dropView2.frame.size.width / 2;
222 |
223 | UIBezierPath *dropPath2 = [UIBezierPath bezierPath];
224 | [dropPath2 moveToPoint:p];
225 | [dropPath2 addQuadCurveToPoint:dropView2.center controlPoint:CGPointMake((p.x - dropView2.center.x) / 2 + dropView2.center.x, p.y - 20)];
226 |
227 | CAKeyframeAnimation *dropAnim2 = [CAKeyframeAnimation animationWithKeyPath:@"position"];
228 | dropAnim2.path = dropPath2.CGPath;
229 | dropAnim2.duration = 0.5f;
230 | dropAnim2.timingFunction = [CAMediaTimingFunction functionWithControlPoints:0.1 :0.4 :0.9:0.6];
231 | dropAnim2.delegate = self;
232 | dropAnim2.removedOnCompletion = NO;
233 | dropAnim2.fillMode = kCAFillModeForwards;
234 | [dropView2.layer addAnimation:dropAnim2 forKey:@"dropAnim2"];
235 |
236 |
237 | //第三个水滴
238 | if (dropView3 == nil) {
239 | dropView3 = [[UIView alloc]initWithFrame:CGRectZero];
240 | dropView3.backgroundColor = [UIColor colorWithRed:0 green:0.722 blue:1 alpha:1];
241 | [self addSubview:dropView3];
242 | }
243 | dropView3.center = CGPointMake(p.x + 50, p.y);
244 | dropView3.bounds = CGRectMake(0, 0, 5, 5);
245 | dropView3.layer.cornerRadius = dropView3.frame.size.width / 2;
246 |
247 | UIBezierPath *dropPath3 = [UIBezierPath bezierPath];
248 | [dropPath3 moveToPoint:p];
249 | [dropPath3 addQuadCurveToPoint:dropView3.center controlPoint:CGPointMake((dropView3.center.x - p.x) / 2 + p.x, p.y - 20)];
250 |
251 | CAKeyframeAnimation *dropAnim3 = [CAKeyframeAnimation animationWithKeyPath:@"position"];
252 | dropAnim3.path = dropPath3.CGPath;
253 | dropAnim3.duration = 0.5f;
254 | dropAnim3.timingFunction = [CAMediaTimingFunction functionWithControlPoints:0.1 :0.4 :0.9:0.6];
255 | dropAnim3.delegate = self;
256 | dropAnim3.removedOnCompletion = NO;
257 | dropAnim3.fillMode = kCAFillModeForwards;
258 | [dropView3.layer addAnimation:dropAnim3 forKey:@"dropAnim3"];
259 |
260 | }
261 |
262 | }
263 |
264 | @end
265 |
--------------------------------------------------------------------------------
/KYWaterWaveAnimation.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 5FA24B4F1AB70773000E79BF /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FA24B4E1AB70773000E79BF /* main.m */; };
11 | 5FA24B521AB70773000E79BF /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FA24B511AB70773000E79BF /* AppDelegate.m */; };
12 | 5FA24B551AB70773000E79BF /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FA24B541AB70773000E79BF /* ViewController.m */; };
13 | 5FA24B581AB70773000E79BF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 5FA24B561AB70773000E79BF /* Main.storyboard */; };
14 | 5FA24B5A1AB70773000E79BF /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5FA24B591AB70773000E79BF /* Images.xcassets */; };
15 | 5FA24B5D1AB70773000E79BF /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 5FA24B5B1AB70773000E79BF /* LaunchScreen.xib */; };
16 | 5FA24B691AB70773000E79BF /* KYWaterWaveAnimationTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FA24B681AB70773000E79BF /* KYWaterWaveAnimationTests.m */; };
17 | 5FA24B741AB718A7000E79BF /* KYWaterWaveView.m in Sources */ = {isa = PBXBuildFile; fileRef = 5FA24B731AB718A7000E79BF /* KYWaterWaveView.m */; };
18 | /* End PBXBuildFile section */
19 |
20 | /* Begin PBXContainerItemProxy section */
21 | 5FA24B631AB70773000E79BF /* PBXContainerItemProxy */ = {
22 | isa = PBXContainerItemProxy;
23 | containerPortal = 5FA24B411AB70773000E79BF /* Project object */;
24 | proxyType = 1;
25 | remoteGlobalIDString = 5FA24B481AB70773000E79BF;
26 | remoteInfo = KYWaterWaveAnimation;
27 | };
28 | /* End PBXContainerItemProxy section */
29 |
30 | /* Begin PBXFileReference section */
31 | 5FA24B491AB70773000E79BF /* KYWaterWaveAnimation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KYWaterWaveAnimation.app; sourceTree = BUILT_PRODUCTS_DIR; };
32 | 5FA24B4D1AB70773000E79BF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
33 | 5FA24B4E1AB70773000E79BF /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
34 | 5FA24B501AB70773000E79BF /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
35 | 5FA24B511AB70773000E79BF /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
36 | 5FA24B531AB70773000E79BF /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
37 | 5FA24B541AB70773000E79BF /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
38 | 5FA24B571AB70773000E79BF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
39 | 5FA24B591AB70773000E79BF /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
40 | 5FA24B5C1AB70773000E79BF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; };
41 | 5FA24B621AB70773000E79BF /* KYWaterWaveAnimationTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = KYWaterWaveAnimationTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
42 | 5FA24B671AB70773000E79BF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
43 | 5FA24B681AB70773000E79BF /* KYWaterWaveAnimationTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = KYWaterWaveAnimationTests.m; sourceTree = ""; };
44 | 5FA24B721AB718A7000E79BF /* KYWaterWaveView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = KYWaterWaveView.h; sourceTree = ""; };
45 | 5FA24B731AB718A7000E79BF /* KYWaterWaveView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = KYWaterWaveView.m; sourceTree = ""; };
46 | /* End PBXFileReference section */
47 |
48 | /* Begin PBXFrameworksBuildPhase section */
49 | 5FA24B461AB70773000E79BF /* Frameworks */ = {
50 | isa = PBXFrameworksBuildPhase;
51 | buildActionMask = 2147483647;
52 | files = (
53 | );
54 | runOnlyForDeploymentPostprocessing = 0;
55 | };
56 | 5FA24B5F1AB70773000E79BF /* Frameworks */ = {
57 | isa = PBXFrameworksBuildPhase;
58 | buildActionMask = 2147483647;
59 | files = (
60 | );
61 | runOnlyForDeploymentPostprocessing = 0;
62 | };
63 | /* End PBXFrameworksBuildPhase section */
64 |
65 | /* Begin PBXGroup section */
66 | 5FA24B401AB70773000E79BF = {
67 | isa = PBXGroup;
68 | children = (
69 | 5FA24B4B1AB70773000E79BF /* KYWaterWaveAnimation */,
70 | 5FA24B651AB70773000E79BF /* KYWaterWaveAnimationTests */,
71 | 5FA24B4A1AB70773000E79BF /* Products */,
72 | );
73 | sourceTree = "";
74 | };
75 | 5FA24B4A1AB70773000E79BF /* Products */ = {
76 | isa = PBXGroup;
77 | children = (
78 | 5FA24B491AB70773000E79BF /* KYWaterWaveAnimation.app */,
79 | 5FA24B621AB70773000E79BF /* KYWaterWaveAnimationTests.xctest */,
80 | );
81 | name = Products;
82 | sourceTree = "";
83 | };
84 | 5FA24B4B1AB70773000E79BF /* KYWaterWaveAnimation */ = {
85 | isa = PBXGroup;
86 | children = (
87 | 5FA24B501AB70773000E79BF /* AppDelegate.h */,
88 | 5FA24B511AB70773000E79BF /* AppDelegate.m */,
89 | 5FA24B531AB70773000E79BF /* ViewController.h */,
90 | 5FA24B541AB70773000E79BF /* ViewController.m */,
91 | 5FA24B561AB70773000E79BF /* Main.storyboard */,
92 | 5FA24B751AB726D9000E79BF /* KYWaterWaveView */,
93 | 5FA24B591AB70773000E79BF /* Images.xcassets */,
94 | 5FA24B5B1AB70773000E79BF /* LaunchScreen.xib */,
95 | 5FA24B4C1AB70773000E79BF /* Supporting Files */,
96 | );
97 | path = KYWaterWaveAnimation;
98 | sourceTree = "";
99 | };
100 | 5FA24B4C1AB70773000E79BF /* Supporting Files */ = {
101 | isa = PBXGroup;
102 | children = (
103 | 5FA24B4D1AB70773000E79BF /* Info.plist */,
104 | 5FA24B4E1AB70773000E79BF /* main.m */,
105 | );
106 | name = "Supporting Files";
107 | sourceTree = "";
108 | };
109 | 5FA24B651AB70773000E79BF /* KYWaterWaveAnimationTests */ = {
110 | isa = PBXGroup;
111 | children = (
112 | 5FA24B681AB70773000E79BF /* KYWaterWaveAnimationTests.m */,
113 | 5FA24B661AB70773000E79BF /* Supporting Files */,
114 | );
115 | path = KYWaterWaveAnimationTests;
116 | sourceTree = "";
117 | };
118 | 5FA24B661AB70773000E79BF /* Supporting Files */ = {
119 | isa = PBXGroup;
120 | children = (
121 | 5FA24B671AB70773000E79BF /* Info.plist */,
122 | );
123 | name = "Supporting Files";
124 | sourceTree = "";
125 | };
126 | 5FA24B751AB726D9000E79BF /* KYWaterWaveView */ = {
127 | isa = PBXGroup;
128 | children = (
129 | 5FA24B721AB718A7000E79BF /* KYWaterWaveView.h */,
130 | 5FA24B731AB718A7000E79BF /* KYWaterWaveView.m */,
131 | );
132 | name = KYWaterWaveView;
133 | sourceTree = "";
134 | };
135 | /* End PBXGroup section */
136 |
137 | /* Begin PBXNativeTarget section */
138 | 5FA24B481AB70773000E79BF /* KYWaterWaveAnimation */ = {
139 | isa = PBXNativeTarget;
140 | buildConfigurationList = 5FA24B6C1AB70773000E79BF /* Build configuration list for PBXNativeTarget "KYWaterWaveAnimation" */;
141 | buildPhases = (
142 | 5FA24B451AB70773000E79BF /* Sources */,
143 | 5FA24B461AB70773000E79BF /* Frameworks */,
144 | 5FA24B471AB70773000E79BF /* Resources */,
145 | );
146 | buildRules = (
147 | );
148 | dependencies = (
149 | );
150 | name = KYWaterWaveAnimation;
151 | productName = KYWaterWaveAnimation;
152 | productReference = 5FA24B491AB70773000E79BF /* KYWaterWaveAnimation.app */;
153 | productType = "com.apple.product-type.application";
154 | };
155 | 5FA24B611AB70773000E79BF /* KYWaterWaveAnimationTests */ = {
156 | isa = PBXNativeTarget;
157 | buildConfigurationList = 5FA24B6F1AB70773000E79BF /* Build configuration list for PBXNativeTarget "KYWaterWaveAnimationTests" */;
158 | buildPhases = (
159 | 5FA24B5E1AB70773000E79BF /* Sources */,
160 | 5FA24B5F1AB70773000E79BF /* Frameworks */,
161 | 5FA24B601AB70773000E79BF /* Resources */,
162 | );
163 | buildRules = (
164 | );
165 | dependencies = (
166 | 5FA24B641AB70773000E79BF /* PBXTargetDependency */,
167 | );
168 | name = KYWaterWaveAnimationTests;
169 | productName = KYWaterWaveAnimationTests;
170 | productReference = 5FA24B621AB70773000E79BF /* KYWaterWaveAnimationTests.xctest */;
171 | productType = "com.apple.product-type.bundle.unit-test";
172 | };
173 | /* End PBXNativeTarget section */
174 |
175 | /* Begin PBXProject section */
176 | 5FA24B411AB70773000E79BF /* Project object */ = {
177 | isa = PBXProject;
178 | attributes = {
179 | LastUpgradeCheck = 0620;
180 | ORGANIZATIONNAME = "Kitten Yang";
181 | TargetAttributes = {
182 | 5FA24B481AB70773000E79BF = {
183 | CreatedOnToolsVersion = 6.2;
184 | DevelopmentTeam = Y6BM76G9E8;
185 | };
186 | 5FA24B611AB70773000E79BF = {
187 | CreatedOnToolsVersion = 6.2;
188 | TestTargetID = 5FA24B481AB70773000E79BF;
189 | };
190 | };
191 | };
192 | buildConfigurationList = 5FA24B441AB70773000E79BF /* Build configuration list for PBXProject "KYWaterWaveAnimation" */;
193 | compatibilityVersion = "Xcode 3.2";
194 | developmentRegion = English;
195 | hasScannedForEncodings = 0;
196 | knownRegions = (
197 | en,
198 | Base,
199 | );
200 | mainGroup = 5FA24B401AB70773000E79BF;
201 | productRefGroup = 5FA24B4A1AB70773000E79BF /* Products */;
202 | projectDirPath = "";
203 | projectRoot = "";
204 | targets = (
205 | 5FA24B481AB70773000E79BF /* KYWaterWaveAnimation */,
206 | 5FA24B611AB70773000E79BF /* KYWaterWaveAnimationTests */,
207 | );
208 | };
209 | /* End PBXProject section */
210 |
211 | /* Begin PBXResourcesBuildPhase section */
212 | 5FA24B471AB70773000E79BF /* Resources */ = {
213 | isa = PBXResourcesBuildPhase;
214 | buildActionMask = 2147483647;
215 | files = (
216 | 5FA24B581AB70773000E79BF /* Main.storyboard in Resources */,
217 | 5FA24B5D1AB70773000E79BF /* LaunchScreen.xib in Resources */,
218 | 5FA24B5A1AB70773000E79BF /* Images.xcassets in Resources */,
219 | );
220 | runOnlyForDeploymentPostprocessing = 0;
221 | };
222 | 5FA24B601AB70773000E79BF /* Resources */ = {
223 | isa = PBXResourcesBuildPhase;
224 | buildActionMask = 2147483647;
225 | files = (
226 | );
227 | runOnlyForDeploymentPostprocessing = 0;
228 | };
229 | /* End PBXResourcesBuildPhase section */
230 |
231 | /* Begin PBXSourcesBuildPhase section */
232 | 5FA24B451AB70773000E79BF /* Sources */ = {
233 | isa = PBXSourcesBuildPhase;
234 | buildActionMask = 2147483647;
235 | files = (
236 | 5FA24B551AB70773000E79BF /* ViewController.m in Sources */,
237 | 5FA24B741AB718A7000E79BF /* KYWaterWaveView.m in Sources */,
238 | 5FA24B521AB70773000E79BF /* AppDelegate.m in Sources */,
239 | 5FA24B4F1AB70773000E79BF /* main.m in Sources */,
240 | );
241 | runOnlyForDeploymentPostprocessing = 0;
242 | };
243 | 5FA24B5E1AB70773000E79BF /* Sources */ = {
244 | isa = PBXSourcesBuildPhase;
245 | buildActionMask = 2147483647;
246 | files = (
247 | 5FA24B691AB70773000E79BF /* KYWaterWaveAnimationTests.m in Sources */,
248 | );
249 | runOnlyForDeploymentPostprocessing = 0;
250 | };
251 | /* End PBXSourcesBuildPhase section */
252 |
253 | /* Begin PBXTargetDependency section */
254 | 5FA24B641AB70773000E79BF /* PBXTargetDependency */ = {
255 | isa = PBXTargetDependency;
256 | target = 5FA24B481AB70773000E79BF /* KYWaterWaveAnimation */;
257 | targetProxy = 5FA24B631AB70773000E79BF /* PBXContainerItemProxy */;
258 | };
259 | /* End PBXTargetDependency section */
260 |
261 | /* Begin PBXVariantGroup section */
262 | 5FA24B561AB70773000E79BF /* Main.storyboard */ = {
263 | isa = PBXVariantGroup;
264 | children = (
265 | 5FA24B571AB70773000E79BF /* Base */,
266 | );
267 | name = Main.storyboard;
268 | sourceTree = "";
269 | };
270 | 5FA24B5B1AB70773000E79BF /* LaunchScreen.xib */ = {
271 | isa = PBXVariantGroup;
272 | children = (
273 | 5FA24B5C1AB70773000E79BF /* Base */,
274 | );
275 | name = LaunchScreen.xib;
276 | sourceTree = "";
277 | };
278 | /* End PBXVariantGroup section */
279 |
280 | /* Begin XCBuildConfiguration section */
281 | 5FA24B6A1AB70773000E79BF /* Debug */ = {
282 | isa = XCBuildConfiguration;
283 | buildSettings = {
284 | ALWAYS_SEARCH_USER_PATHS = NO;
285 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
286 | CLANG_CXX_LIBRARY = "libc++";
287 | CLANG_ENABLE_MODULES = YES;
288 | CLANG_ENABLE_OBJC_ARC = YES;
289 | CLANG_WARN_BOOL_CONVERSION = YES;
290 | CLANG_WARN_CONSTANT_CONVERSION = YES;
291 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
292 | CLANG_WARN_EMPTY_BODY = YES;
293 | CLANG_WARN_ENUM_CONVERSION = YES;
294 | CLANG_WARN_INT_CONVERSION = YES;
295 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
296 | CLANG_WARN_UNREACHABLE_CODE = YES;
297 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
298 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
299 | COPY_PHASE_STRIP = NO;
300 | ENABLE_STRICT_OBJC_MSGSEND = YES;
301 | GCC_C_LANGUAGE_STANDARD = gnu99;
302 | GCC_DYNAMIC_NO_PIC = NO;
303 | GCC_OPTIMIZATION_LEVEL = 0;
304 | GCC_PREPROCESSOR_DEFINITIONS = (
305 | "DEBUG=1",
306 | "$(inherited)",
307 | );
308 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
309 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
310 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
311 | GCC_WARN_UNDECLARED_SELECTOR = YES;
312 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
313 | GCC_WARN_UNUSED_FUNCTION = YES;
314 | GCC_WARN_UNUSED_VARIABLE = YES;
315 | IPHONEOS_DEPLOYMENT_TARGET = 8.2;
316 | MTL_ENABLE_DEBUG_INFO = YES;
317 | ONLY_ACTIVE_ARCH = YES;
318 | SDKROOT = iphoneos;
319 | };
320 | name = Debug;
321 | };
322 | 5FA24B6B1AB70773000E79BF /* Release */ = {
323 | isa = XCBuildConfiguration;
324 | buildSettings = {
325 | ALWAYS_SEARCH_USER_PATHS = NO;
326 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
327 | CLANG_CXX_LIBRARY = "libc++";
328 | CLANG_ENABLE_MODULES = YES;
329 | CLANG_ENABLE_OBJC_ARC = YES;
330 | CLANG_WARN_BOOL_CONVERSION = YES;
331 | CLANG_WARN_CONSTANT_CONVERSION = YES;
332 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
333 | CLANG_WARN_EMPTY_BODY = YES;
334 | CLANG_WARN_ENUM_CONVERSION = YES;
335 | CLANG_WARN_INT_CONVERSION = YES;
336 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
337 | CLANG_WARN_UNREACHABLE_CODE = YES;
338 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
339 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
340 | COPY_PHASE_STRIP = NO;
341 | ENABLE_NS_ASSERTIONS = NO;
342 | ENABLE_STRICT_OBJC_MSGSEND = YES;
343 | GCC_C_LANGUAGE_STANDARD = gnu99;
344 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
345 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
346 | GCC_WARN_UNDECLARED_SELECTOR = YES;
347 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
348 | GCC_WARN_UNUSED_FUNCTION = YES;
349 | GCC_WARN_UNUSED_VARIABLE = YES;
350 | IPHONEOS_DEPLOYMENT_TARGET = 8.2;
351 | MTL_ENABLE_DEBUG_INFO = NO;
352 | SDKROOT = iphoneos;
353 | VALIDATE_PRODUCT = YES;
354 | };
355 | name = Release;
356 | };
357 | 5FA24B6D1AB70773000E79BF /* Debug */ = {
358 | isa = XCBuildConfiguration;
359 | buildSettings = {
360 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
361 | CODE_SIGN_IDENTITY = "iPhone Developer";
362 | INFOPLIST_FILE = KYWaterWaveAnimation/Info.plist;
363 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
364 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
365 | PRODUCT_NAME = "$(TARGET_NAME)";
366 | TARGETED_DEVICE_FAMILY = "1,2";
367 | };
368 | name = Debug;
369 | };
370 | 5FA24B6E1AB70773000E79BF /* Release */ = {
371 | isa = XCBuildConfiguration;
372 | buildSettings = {
373 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
374 | CODE_SIGN_IDENTITY = "iPhone Developer";
375 | INFOPLIST_FILE = KYWaterWaveAnimation/Info.plist;
376 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
377 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
378 | PRODUCT_NAME = "$(TARGET_NAME)";
379 | TARGETED_DEVICE_FAMILY = "1,2";
380 | };
381 | name = Release;
382 | };
383 | 5FA24B701AB70773000E79BF /* Debug */ = {
384 | isa = XCBuildConfiguration;
385 | buildSettings = {
386 | BUNDLE_LOADER = "$(TEST_HOST)";
387 | FRAMEWORK_SEARCH_PATHS = (
388 | "$(SDKROOT)/Developer/Library/Frameworks",
389 | "$(inherited)",
390 | );
391 | GCC_PREPROCESSOR_DEFINITIONS = (
392 | "DEBUG=1",
393 | "$(inherited)",
394 | );
395 | INFOPLIST_FILE = KYWaterWaveAnimationTests/Info.plist;
396 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
397 | PRODUCT_NAME = "$(TARGET_NAME)";
398 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KYWaterWaveAnimation.app/KYWaterWaveAnimation";
399 | };
400 | name = Debug;
401 | };
402 | 5FA24B711AB70773000E79BF /* Release */ = {
403 | isa = XCBuildConfiguration;
404 | buildSettings = {
405 | BUNDLE_LOADER = "$(TEST_HOST)";
406 | FRAMEWORK_SEARCH_PATHS = (
407 | "$(SDKROOT)/Developer/Library/Frameworks",
408 | "$(inherited)",
409 | );
410 | INFOPLIST_FILE = KYWaterWaveAnimationTests/Info.plist;
411 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
412 | PRODUCT_NAME = "$(TARGET_NAME)";
413 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/KYWaterWaveAnimation.app/KYWaterWaveAnimation";
414 | };
415 | name = Release;
416 | };
417 | /* End XCBuildConfiguration section */
418 |
419 | /* Begin XCConfigurationList section */
420 | 5FA24B441AB70773000E79BF /* Build configuration list for PBXProject "KYWaterWaveAnimation" */ = {
421 | isa = XCConfigurationList;
422 | buildConfigurations = (
423 | 5FA24B6A1AB70773000E79BF /* Debug */,
424 | 5FA24B6B1AB70773000E79BF /* Release */,
425 | );
426 | defaultConfigurationIsVisible = 0;
427 | defaultConfigurationName = Release;
428 | };
429 | 5FA24B6C1AB70773000E79BF /* Build configuration list for PBXNativeTarget "KYWaterWaveAnimation" */ = {
430 | isa = XCConfigurationList;
431 | buildConfigurations = (
432 | 5FA24B6D1AB70773000E79BF /* Debug */,
433 | 5FA24B6E1AB70773000E79BF /* Release */,
434 | );
435 | defaultConfigurationIsVisible = 0;
436 | defaultConfigurationName = Release;
437 | };
438 | 5FA24B6F1AB70773000E79BF /* Build configuration list for PBXNativeTarget "KYWaterWaveAnimationTests" */ = {
439 | isa = XCConfigurationList;
440 | buildConfigurations = (
441 | 5FA24B701AB70773000E79BF /* Debug */,
442 | 5FA24B711AB70773000E79BF /* Release */,
443 | );
444 | defaultConfigurationIsVisible = 0;
445 | defaultConfigurationName = Release;
446 | };
447 | /* End XCConfigurationList section */
448 | };
449 | rootObject = 5FA24B411AB70773000E79BF /* Project object */;
450 | }
451 |
--------------------------------------------------------------------------------