diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fce251b --- /dev/null +++ b/.gitignore @@ -0,0 +1,70 @@ + +# Created by https://www.gitignore.io/api/swift + +### Swift ### +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData/ + +##DS_Store +*.DS_Store +.DS_Store + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xcuserstate + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/docs/Gitignore.md + +fastlane/report.xml +fastlane/screenshots + diff --git a/A guide to iOS animation_logo v1.0.png b/A guide to iOS animation_logo v1.0.png new file mode 100644 index 0000000..d91af99 Binary files /dev/null and b/A guide to iOS animation_logo v1.0.png differ diff --git a/A guide to iOS animation_logo v2.0.png b/A guide to iOS animation_logo v2.0.png new file mode 100644 index 0000000..30fce3d Binary files /dev/null and b/A guide to iOS animation_logo v2.0.png differ diff --git a/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate b/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index bb66314..0000000 Binary files a/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/AnimatedCurveDemo/AnimatedCurveDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate b/AnimatedCurveDemo/AnimatedCurveDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 01cccfb..0000000 Binary files a/AnimatedCurveDemo/AnimatedCurveDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/AnimatedCurveDemo/AnimatedCurveDemo.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/AnimatedCurveDemo/AnimatedCurveDemo.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist deleted file mode 100644 index 9db5cfb..0000000 --- a/AnimatedCurveDemo/AnimatedCurveDemo.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/DownloadButtonDemo/CADemos.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate b/DownloadButtonDemo/CADemos.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index e305006..0000000 Binary files a/DownloadButtonDemo/CADemos.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/DynamicActionBlockDemo/DynamicActionBlockDemo/DynamicActionBlockDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate b/DynamicActionBlockDemo/DynamicActionBlockDemo/DynamicActionBlockDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 38b404e..0000000 Binary files a/DynamicActionBlockDemo/DynamicActionBlockDemo/DynamicActionBlockDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/GooeySlideMenuDemo/GooeySlideMenuDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate b/GooeySlideMenuDemo/GooeySlideMenuDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index e407133..0000000 Binary files a/GooeySlideMenuDemo/GooeySlideMenuDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/GooeySlideMenuDemo/GooeySlideMenuDemo.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/GooeySlideMenuDemo/GooeySlideMenuDemo.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist deleted file mode 100644 index 06a8e72..0000000 --- a/GooeySlideMenuDemo/GooeySlideMenuDemo.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - diff --git a/InteractiveCardDemo/InteractiveCardDemo/InteractiveCardDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate b/InteractiveCardDemo/InteractiveCardDemo/InteractiveCardDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index aac5e72..0000000 Binary files a/InteractiveCardDemo/InteractiveCardDemo/InteractiveCardDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/JumpStarDemo/CoreAnimations.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate b/JumpStarDemo/CoreAnimations.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 99fc7dd..0000000 Binary files a/JumpStarDemo/CoreAnimations.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/KYGooeyMenuDemo/KYGooeyMenu/KYGooeyMenu.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate b/KYGooeyMenuDemo/KYGooeyMenu/KYGooeyMenu.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 57bb867..0000000 Binary files a/KYGooeyMenuDemo/KYGooeyMenu/KYGooeyMenu.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/KYGooeyMenuDemo/KYGooeyMenu/KYGooeyMenu.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/KYGooeyMenuDemo/KYGooeyMenu/KYGooeyMenu.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist deleted file mode 100644 index b777ad7..0000000 --- a/KYGooeyMenuDemo/KYGooeyMenu/KYGooeyMenu.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - diff --git a/KYLoadingHUD/KYLoadingHUD.h b/KYLoadingHUD/KYLoadingHUD.h deleted file mode 100644 index ebcfa87..0000000 --- a/KYLoadingHUD/KYLoadingHUD.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// KYLoadingHUD.h -// -// -// Created by Kitten Yang on 2/23/15. -// Copyright (c) 2015 Kitten Yang. All rights reserved. -// - -#import - -@interface KYLoadingHUD : UIView - - --(void)showHUD; --(void)dismissHUD; -@end diff --git a/KYLoadingHUD/KYLoadingHUD.m b/KYLoadingHUD/KYLoadingHUD.m deleted file mode 100644 index 852779c..0000000 --- a/KYLoadingHUD/KYLoadingHUD.m +++ /dev/null @@ -1,153 +0,0 @@ -// -// KYLoadingHUD.m -// -// -// Created by Kitten Yang on 2/23/15. -// Copyright (c) 2015 Kitten Yang. All rights reserved. -// - -#define ORIGIN_X self.frame.origin.x -#define ORIGIN_Y self.frame.origin.y -#define WIDTH self.frame.size.width -#define HEIGHT self.frame.size.height -#define BALL_RADIUS 20 -#import "KYLoadingHUD.h" - - - -@implementation KYLoadingHUD{ - UIView *ball_1; - UIView *ball_2; - UIView *ball_3; - -} - --(id)initWithFrame:(CGRect)frame{ - self = [super initWithFrame:frame]; - if (self) { - self.backgroundColor = [UIColor clearColor]; - self.layer.cornerRadius = WIDTH /2; - self.clipsToBounds = YES; - } - return self; -} - - --(void)showHUD{ - - -// UIVisualEffectView *bgView = [[UIVisualEffectView alloc]initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleLight ]]; -// bgView.frame = CGRectMake(0, 0, WIDTH, HEIGHT); -// [self addSubview:bgView]; - - - ball_2 = [[UIView alloc]initWithFrame:CGRectMake(WIDTH/2 - BALL_RADIUS/2, HEIGHT / 2-BALL_RADIUS/2, BALL_RADIUS, BALL_RADIUS)]; - ball_2.backgroundColor = [UIColor blackColor]; - ball_2.layer.cornerRadius = ball_2.bounds.size.width / 2; - - ball_1 = [[UIView alloc]initWithFrame:CGRectMake(ball_2.frame.origin.x - BALL_RADIUS, ball_2.frame.origin.y, BALL_RADIUS, BALL_RADIUS)]; - ball_1.backgroundColor = [UIColor blackColor]; - ball_1.layer.cornerRadius = ball_1.bounds.size.width / 2; - - ball_3 = [[UIView alloc]initWithFrame:CGRectMake(ball_2.frame.origin.x + BALL_RADIUS, ball_2.frame.origin.y, BALL_RADIUS, BALL_RADIUS)]; - ball_3.backgroundColor = [UIColor blackColor]; - ball_3.layer.cornerRadius = ball_3.bounds.size.width / 2; - - [self addSubview:ball_1]; - [self addSubview:ball_2]; - [self addSubview:ball_3]; - [self startLoadingAnimation]; - -} - --(void)startLoadingAnimation{ - - //-----1-------- - UIBezierPath *circlePath_1 = [UIBezierPath bezierPath]; - [circlePath_1 moveToPoint:CGPointMake(WIDTH/2-BALL_RADIUS, HEIGHT/2)]; - - [circlePath_1 addArcWithCenter:CGPointMake(WIDTH/2, HEIGHT/2) radius:BALL_RADIUS startAngle:(180*M_PI)/180 endAngle:(360*M_PI)/180 clockwise:NO]; - UIBezierPath *circlePath_1_2 = [UIBezierPath bezierPath]; - [circlePath_1_2 addArcWithCenter:CGPointMake(WIDTH/2, HEIGHT/2) radius:BALL_RADIUS startAngle:0 endAngle:(180*M_PI)/180 clockwise:NO]; - [circlePath_1 appendPath:circlePath_1_2]; - - - CAKeyframeAnimation *animation=[CAKeyframeAnimation animationWithKeyPath:@"position"]; - animation.path = circlePath_1.CGPath; - animation.removedOnCompletion = NO; - animation.fillMode = kCAFillModeForwards; - animation.calculationMode = kCAAnimationCubic; - animation.repeatCount = 1; - animation.duration = 1.4; - animation.delegate = self; - // animation.beginTime = 0.1; - animation.autoreverses = NO; - animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; - - - [ball_1.layer addAnimation:animation forKey:@"animation"]; - - - //------2-------- - UIBezierPath *circlePath_2 = [UIBezierPath bezierPath]; - [circlePath_2 moveToPoint:CGPointMake(WIDTH/2+BALL_RADIUS, HEIGHT/2)]; - - [circlePath_2 addArcWithCenter:CGPointMake(WIDTH/2, HEIGHT/2) radius:BALL_RADIUS startAngle:(0*M_PI)/180 endAngle:(180*M_PI)/180 clockwise:NO]; - UIBezierPath *circlePath_2_2 = [UIBezierPath bezierPath]; - [circlePath_2_2 addArcWithCenter:CGPointMake(WIDTH/2, HEIGHT/2) radius:BALL_RADIUS startAngle:(180 *M_PI)/180 endAngle:(360*M_PI)/180 clockwise:NO]; - [circlePath_2 appendPath:circlePath_2_2]; - - - CAKeyframeAnimation *animation_2=[CAKeyframeAnimation animationWithKeyPath:@"position"]; - animation_2.path = circlePath_2.CGPath; - animation_2.removedOnCompletion = NO; - animation_2.fillMode = kCAFillModeForwards; - animation_2.repeatCount = 1; - // animation_2.beginTime = 0.1; - animation_2.duration =1.4 ; - animation_2.autoreverses = NO; - animation_2.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; - [ball_3.layer addAnimation:animation_2 forKey:@"Rotation"]; - -} - - -- (void)animationDidStart:(CAAnimation *)anim{ - - [UIView animateWithDuration:0.3 delay:0.1 options:UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionBeginFromCurrentState animations:^{ - ball_1.transform = CGAffineTransformMakeTranslation(-BALL_RADIUS, 0); - ball_1.transform = CGAffineTransformScale(ball_1.transform, 0.7, 0.7); - - ball_3.transform = CGAffineTransformMakeTranslation(BALL_RADIUS, 0); - ball_3.transform = CGAffineTransformScale(ball_3.transform, 0.7, 0.7); - - ball_2.transform = CGAffineTransformScale(ball_2.transform, 0.7, 0.7); - - - } completion:^(BOOL finished) { - [UIView animateWithDuration:0.3 delay:0.1 options:UIViewAnimationOptionCurveEaseIn | UIViewAnimationOptionBeginFromCurrentState animations:^{ - ball_1.transform = CGAffineTransformIdentity; - ball_3.transform = CGAffineTransformIdentity; - ball_2.transform = CGAffineTransformIdentity; - - } completion:nil]; - }]; - -} - - --(void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag{ - [self startLoadingAnimation]; -} - - --(void)dismissHUD{ - [UIView animateWithDuration:1 delay:0.0f usingSpringWithDamping:0.6f initialSpringVelocity:0.0f options:UIViewAnimationOptionCurveEaseInOut animations:^{ - self.transform = CGAffineTransformScale(self.transform, 1.5, 1.5); - self.alpha = 0; - } completion:^(BOOL finished) { - [self removeFromSuperview]; - }]; -} - -@end diff --git a/KYPingTransitionDemo/KYPingTransition.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate b/KYPingTransitionDemo/KYPingTransition.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index 45bbbb9..0000000 Binary files a/KYPingTransitionDemo/KYPingTransition.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate and /dev/null differ diff --git a/KYPingTransitionDemo/KYPingTransition.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/KYPingTransitionDemo/KYPingTransition.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist deleted file mode 100644 index 98647c0..0000000 --- a/KYPingTransitionDemo/KYPingTransition.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - diff --git a/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/project.pbxproj b/Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/project.pbxproj similarity index 100% rename from AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/project.pbxproj rename to Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/project.pbxproj diff --git a/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate b/Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..26b2eb3 Binary files /dev/null and b/Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/project.xcworkspace/xcuserdata/KittenYang.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcschemes/AnimatedCircleDemo.xcscheme b/Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcschemes/AnimatedCircleDemo.xcscheme similarity index 100% rename from AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcschemes/AnimatedCircleDemo.xcscheme rename to Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcschemes/AnimatedCircleDemo.xcscheme diff --git a/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcschemes/xcschememanagement.plist b/Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcschemes/xcschememanagement.plist similarity index 100% rename from AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcschemes/xcschememanagement.plist rename to Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo.xcodeproj/xcuserdata/KittenYang.xcuserdatad/xcschemes/xcschememanagement.plist diff --git a/AnimatedCircleDemo/AnimatedCircleDemo/AppDelegate.h b/Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo/AppDelegate.h similarity index 100% rename from AnimatedCircleDemo/AnimatedCircleDemo/AppDelegate.h rename to Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo/AppDelegate.h diff --git a/AnimatedCircleDemo/AnimatedCircleDemo/AppDelegate.m b/Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo/AppDelegate.m similarity index 100% rename from AnimatedCircleDemo/AnimatedCircleDemo/AppDelegate.m rename to Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo/AppDelegate.m diff --git a/AnimatedCircleDemo/AnimatedCircleDemo/Base.lproj/LaunchScreen.xib b/Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo/Base.lproj/LaunchScreen.xib similarity index 100% rename from AnimatedCircleDemo/AnimatedCircleDemo/Base.lproj/LaunchScreen.xib rename to Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo/Base.lproj/LaunchScreen.xib diff --git a/AnimatedCircleDemo/AnimatedCircleDemo/Base.lproj/Main.storyboard b/Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo/Base.lproj/Main.storyboard similarity index 89% rename from AnimatedCircleDemo/AnimatedCircleDemo/Base.lproj/Main.storyboard rename to Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo/Base.lproj/Main.storyboard index fad059c..22fc87d 100644 --- a/AnimatedCircleDemo/AnimatedCircleDemo/Base.lproj/Main.storyboard +++ b/Objective-C Version/AnimatedCircleDemo/AnimatedCircleDemo/Base.lproj/Main.storyboard @@ -1,7 +1,8 @@ - + - + + @@ -22,13 +23,13 @@ -