├── demo.gif
├── CCTransitionDemo
├── CCTransitionDemo
│ ├── 130930-IPHONE5-IOS7-D.jpg
│ ├── AppDelegate.h
│ ├── CCPushedViewController.h
│ ├── CCModalViewController.h
│ ├── Prefix.pch
│ ├── main.m
│ ├── LaunchScreen.storyboard
│ ├── CCPushedViewController.m
│ ├── CCModalViewController.m
│ ├── CCMainViewController.h
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Info.plist
│ ├── CCPushedViewController.xib
│ ├── AppDelegate.m
│ ├── CCModalViewController.xib
│ ├── CCMainViewController.m
│ └── CCMainViewController.xib
└── CCTransitionDemo.xcodeproj
│ ├── project.xcworkspace
│ └── contents.xcworkspacedata
│ └── project.pbxproj
├── Source
├── AnimationControllers
│ ├── CCLayerAnimation.h
│ ├── CCScaleAnimation.h
│ ├── CCFlipAnimation.h
│ ├── CCSlideAnimation.h
│ ├── CCBaseAnimation.m
│ ├── CCBaseAnimation.h
│ ├── CCScaleAnimation.m
│ ├── CCFlipAnimation.m
│ ├── CCSlideAnimation.m
│ └── CCLayerAnimation.m
├── CCViewController.h
├── CCNavigationController.h
├── CCNavigationController.m
└── CCViewController.m
├── CCTransition.podspec
├── LICENSE
├── .gitignore
└── README.md
/demo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xiongcaichang/CCTransition/HEAD/demo.gif
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo/130930-IPHONE5-IOS7-D.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xiongcaichang/CCTransition/HEAD/CCTransitionDemo/CCTransitionDemo/130930-IPHONE5-IOS7-D.jpg
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // CCTransitionAnimation
4 | //
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo/CCPushedViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCPushedViewController.h
3 | // CCTransitionAnimation
4 | //https://github.com/xiongcaichang/CCTransition
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CCPushedViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo/CCModalViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCModalViewController.h
3 | // CCTransitionAnimation
4 | //https://github.com/xiongcaichang/CCTransition
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface CCModalViewController : UIViewController
12 |
13 | - (IBAction)dismissButtonTapped:(id)sender;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo/Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #import
8 |
9 | #ifndef __IPHONE_3_0
10 | #warning "This project uses features only available in iOS SDK 3.0 and later."
11 | #endif
12 |
13 | #ifdef __OBJC__
14 | #import
15 | #import
16 | #endif
17 |
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // CCTransitionAnimationDemo
4 | //
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2014 bear. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #import "AppDelegate.h"
12 |
13 | int main(int argc, char * argv[])
14 | {
15 | @autoreleasepool {
16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Source/AnimationControllers/CCLayerAnimation.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCLayerAnimation.h
3 | // CCTransitionAnimation
4 | //
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 |
8 | #import "CCBaseAnimation.h"
9 |
10 | /**
11 | Types of layer animation
12 | */
13 | typedef NS_ENUM(NSInteger, CCLayerAnimationType) {
14 | CCLayerAnimationCover,
15 | CCLayerAnimationReveal
16 | };
17 |
18 | @interface CCLayerAnimation : CCBaseAnimation
19 |
20 | /** Inits with specific layer type.
21 | @param type Type of layer animation.
22 | @return An instance of CCLayerAnimation with the specified type.
23 | */
24 | - (instancetype)initWithType:(CCLayerAnimationType)type;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Source/AnimationControllers/CCScaleAnimation.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCScaleAnimation.h
3 | // CCTransitionAnimation
4 | //
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import "CCBaseAnimation.h"
10 |
11 | /**
12 | Types of scale animation
13 | */
14 |
15 | typedef NS_ENUM(NSInteger, CCScaleAnimationType){
16 | CCScaleAnimationFadeIn,
17 | CCScaleAnimationDropIn
18 | };
19 |
20 | @interface CCScaleAnimation : CCBaseAnimation
21 |
22 | /** Inits with specific zooming type.
23 | @param type Type of scale animation.
24 | @return An instance of CCScaleAnimation with the specified type.
25 | */
26 | - (instancetype) initWithType:(CCScaleAnimationType)type;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Source/AnimationControllers/CCFlipAnimation.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCFlipAnimation.h
3 | // CCTransitionAnimation
4 | //
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import "CCBaseAnimation.h"
10 |
11 | /**
12 | Types of flip animation
13 | */
14 | typedef NS_ENUM(NSInteger, CCFlipAnimationType) {
15 | CCFlipAnimationLeft,
16 | CCFlipAnimationRight,
17 | CCFlipAnimationTop,
18 | CCFlipAnimationBottom
19 | };
20 |
21 | @interface CCFlipAnimation : CCBaseAnimation
22 |
23 | /** Inits with specific flip type.
24 | @param type Type of flip animation.
25 | @return An instance of CCFlipAnimation with the specified type.
26 | */
27 | - (instancetype)initWithType:(CCFlipAnimationType)type;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Source/CCViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCViewController.h
3 | // CCTransitionAnimation
4 | //https://github.com/xiongcaichang/CCTransition
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "CCBaseAnimation.h"
11 |
12 | @interface CCViewController : UIViewController
13 |
14 | /**
15 | Animation for the transition
16 | */
17 | @property (strong, nonatomic) CCBaseAnimation *animationController;
18 |
19 | /**
20 | Whether interaction should be enabled for transitioning
21 | */
22 | @property (assign, nonatomic) BOOL interactionEnabled;
23 |
24 | /** Inits with nib and transitioning animations
25 | @param animation Animation for the transition
26 | @return An instance of CCFancyViewController
27 | */
28 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil withAnimation:(CCBaseAnimation *) animation;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Source/CCNavigationController.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCNavigationController.h
3 | // CCTransitionAnimation
4 | //https://github.com/xiongcaichang/CCTransition
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "CCBaseAnimation.h"
11 |
12 | @interface CCNavigationController : UINavigationController
13 |
14 | /**
15 | Animation for the transition
16 | */
17 | @property (strong, nonatomic) CCBaseAnimation *animationController;
18 |
19 | /**
20 | Whether interaction should be enabled for transitioning
21 | */
22 | @property (assign, nonatomic) BOOL interactionEnabled;
23 |
24 | /** Inits with rootViewController and transitioning animations
25 | @param animation Animation for the transition
26 | @return An instance of CCFancyNavigationController
27 | */
28 | - (id)initWithRootViewController:(UIViewController *)rootViewController withAnimation:(CCBaseAnimation *)animation;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo/CCPushedViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCPushedViewController.m
3 | // CCTransitionAnimation
4 | //https://github.com/xiongcaichang/CCTransition
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import "CCPushedViewController.h"
10 |
11 | @interface CCPushedViewController ()
12 |
13 | @end
14 |
15 | @implementation CCPushedViewController
16 |
17 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
18 | {
19 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
20 | if (self) {
21 | // Custom initialization
22 | }
23 | return self;
24 | }
25 |
26 | - (void)viewDidLoad
27 | {
28 | [super viewDidLoad];
29 | // Do any additional setup after loading the view from its nib.
30 | }
31 |
32 | - (void)didReceiveMemoryWarning
33 | {
34 | [super didReceiveMemoryWarning];
35 | // Dispose of any resources that can be recreated.
36 | }
37 |
38 | @end
39 |
--------------------------------------------------------------------------------
/Source/AnimationControllers/CCSlideAnimation.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCBounceAnimation.h
3 | // CCTransitionAnimation
4 | //
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import "CCBaseAnimation.h"
10 |
11 | /**
12 | Types of sliding animation
13 | */
14 | typedef NS_ENUM (NSInteger, CCSlideAnimationType){
15 | CCSlideAnimationFromLeft,
16 | CCSlideAnimationFromRight,
17 | CCSlideAnimationFromTop,
18 | CCSlideAnimationFromBottom
19 | };
20 |
21 | @interface CCSlideAnimation : CCBaseAnimation
22 |
23 | /**
24 | Velocity of the sliding.
25 | */
26 | @property (assign, nonatomic) CGFloat velocity;
27 |
28 | /**
29 | Damping of the sliding.
30 | */
31 | @property (assign, nonatomic) CGFloat damping;
32 |
33 | /** Inits with specific sliding type.
34 | @param type sliding direction.
35 | @return An instance of CCBounceAnimation with the specified bouncing direction.
36 | */
37 | - (instancetype) initWithType:(CCSlideAnimationType)type;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/CCTransition.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 |
3 | s.name = "CCTransition"
4 | s.version = "1.0.0"
5 | s.summary = "Library to customize transition animation in iOS 7"
6 |
7 | s.description = <<-DESC
8 | CCTransition provides a convenient method to present view controllers with custom animation and interaction.
9 | You can also easily create your own transition animations and apply them to your view controllers to make your app stand out.
10 |
11 | DESC
12 | s.screenshots = "https://raw.githubusercontent.com/xiongcaichang/CCTransition/master/Demo.gif"
13 | s.homepage = "https://github.com/xiongcaichang/CCTransition"
14 | s.social_media_url = 'http://www.xiongcaichang.com'
15 | s.license = 'MIT'
16 |
17 | s.author = "xiongcaichang"
18 |
19 | s.platform = :ios, "6.1"
20 |
21 | s.source = { :git => "https://github.com/xiongcaichang/CCTransition.git", :tag => "1.0.0" }
22 |
23 | s.source_files = "Source/**/*.{h,m}"
24 |
25 | s.framework = "UIKit"
26 |
27 | s.requires_arc = true
28 |
29 | end
30 |
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo/CCModalViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCModalViewController.m
3 | // CCTransitionAnimation
4 | //https://github.com/xiongcaichang/CCTransition
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import "CCModalViewController.h"
10 |
11 | @interface CCModalViewController ()
12 |
13 | @end
14 |
15 | @implementation CCModalViewController
16 |
17 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
18 | {
19 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
20 | if (self) {
21 | // Custom initialization
22 | }
23 | return self;
24 | }
25 |
26 | - (void)viewDidLoad
27 | {
28 | [super viewDidLoad];
29 | // Do any additional setup after loading the view from its nib.
30 | }
31 |
32 | - (void)didReceiveMemoryWarning
33 | {
34 | [super didReceiveMemoryWarning];
35 | // Dispose of any resources that can be recreated.
36 | }
37 |
38 | - (IBAction)dismissButtonTapped:(id)sender {
39 | [self dismissViewControllerAnimated:YES completion:nil];
40 | }
41 | @end
42 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2014 itsmeichigo
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.
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo/CCMainViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCMainViewController.h
3 | // CCTransitionAnimation
4 | // https://github.com/xiongcaichang/CCTransition
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "CCViewController.h"
11 |
12 | @interface CCMainViewController : CCViewController
13 |
14 | @property (weak, nonatomic) IBOutlet UIView *optionView;
15 | @property (weak, nonatomic) IBOutlet UIPickerView *pickerView;
16 | @property (strong, nonatomic) IBOutlet UIView *contentView;
17 | @property (weak, nonatomic) IBOutlet UIScrollView *scrollView;
18 | @property (weak, nonatomic) IBOutlet UIBarButtonItem *doneButton;
19 |
20 | @property (weak, nonatomic) IBOutlet UITextField *navigationField;
21 | @property (weak, nonatomic) IBOutlet UITextField *typeNavigationField;
22 | @property (weak, nonatomic) IBOutlet UITextField *modalField;
23 | @property (weak, nonatomic) IBOutlet UITextField *typeModalField;
24 |
25 | - (IBAction)navigationButtonTapped:(id)sender;
26 | - (IBAction)modalButtonTapped:(id)sender;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo/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 | "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 | "idiom" : "ipad",
65 | "size" : "83.5x83.5",
66 | "scale" : "2x"
67 | }
68 | ],
69 | "info" : {
70 | "version" : 1,
71 | "author" : "xcode"
72 | }
73 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xcuserstate
23 |
24 | ## Obj-C/Swift specific
25 | *.hmap
26 | *.ipa
27 | *.dSYM.zip
28 | *.dSYM
29 |
30 | # CocoaPods
31 | #
32 | # We recommend against adding the Pods directory to your .gitignore. However
33 | # you should judge for yourself, the pros and cons are mentioned at:
34 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
35 | #
36 | # Pods/
37 |
38 | # Carthage
39 | #
40 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
41 | # Carthage/Checkouts
42 |
43 | Carthage/Build
44 |
45 | # fastlane
46 | #
47 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
48 | # screenshots whenever they are needed.
49 | # For more information about the recommended setup visit:
50 | # https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
51 |
52 | fastlane/report.xml
53 | fastlane/screenshots
54 |
55 | #Code Injection
56 | #
57 | # After new code Injection tools there's a generated folder /iOSInjectionProject
58 | # https://github.com/johnno1962/injectionforxcode
59 |
60 | iOSInjectionProject/
61 |
62 | *.xccheckout
63 |
64 | *.xccheckout
65 |
--------------------------------------------------------------------------------
/Source/AnimationControllers/CCBaseAnimation.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCBaseAnimation.m
3 | // CCTransitionAnimation
4 | //
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import "CCBaseAnimation.h"
10 |
11 | @implementation CCBaseAnimation
12 |
13 | #pragma mark - Init method
14 |
15 | - (id) init
16 | {
17 | self = [super init];
18 | if (self){
19 | self.animationDuration = 1.0f;
20 | }
21 | return self;
22 | }
23 |
24 |
25 | #pragma mark - UIViewControllerAnimatedTransitioning
26 |
27 | - (NSTimeInterval)transitionDuration:(id)transitionContext {
28 | return self.animationDuration;
29 | }
30 |
31 | - (void)animateTransition:(id)transitionContext {
32 |
33 | UIView *fromView = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey].view;
34 | UIView *toView = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey].view;
35 |
36 | int starY=64;
37 | if (_modalTransition) {
38 | starY=0;
39 | }
40 |
41 | fromView.frame=CGRectMake(0, starY, SCREEN_WIDTH, SCREEN_HEIGHT);
42 | toView.frame=CGRectMake(0, starY, SCREEN_WIDTH, SCREEN_HEIGHT);
43 |
44 | [self animateTransition:transitionContext fromView:fromView toView:toView];
45 | }
46 |
47 |
48 | #pragma mark - Helper methods
49 |
50 | - (void)animateTransition:(id)transitionContext fromView:(UIView*)fromView toView:(UIView*)toView
51 | {
52 |
53 | }
54 |
55 | - (void)setInteractionEnabled
56 | {
57 |
58 | }
59 |
60 | @end
61 |
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIcons
12 |
13 | CFBundleIcons~ipad
14 |
15 | CFBundleIdentifier
16 | $(PRODUCT_BUNDLE_IDENTIFIER)
17 | CFBundleInfoDictionaryVersion
18 | 6.0
19 | CFBundleName
20 | ${PRODUCT_NAME}
21 | CFBundlePackageType
22 | APPL
23 | CFBundleShortVersionString
24 | 1.0
25 | CFBundleSignature
26 | ????
27 | CFBundleVersion
28 | 1.0
29 | LSRequiresIPhoneOS
30 |
31 | UILaunchStoryboardName
32 | LaunchScreen
33 | UIRequiredDeviceCapabilities
34 |
35 | armv7
36 |
37 | UISupportedInterfaceOrientations
38 |
39 | UIInterfaceOrientationPortrait
40 | UIInterfaceOrientationLandscapeLeft
41 | UIInterfaceOrientationLandscapeRight
42 |
43 | UISupportedInterfaceOrientations~ipad
44 |
45 | UIInterfaceOrientationPortrait
46 | UIInterfaceOrientationPortraitUpsideDown
47 | UIInterfaceOrientationLandscapeLeft
48 | UIInterfaceOrientationLandscapeRight
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/Source/AnimationControllers/CCBaseAnimation.h:
--------------------------------------------------------------------------------
1 | //
2 | // CCBaseAnimation.h
3 | // CCTransitionAnimation
4 | //
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | #define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height
12 | #define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width
13 |
14 |
15 | @interface CCBaseAnimation : UIPercentDrivenInteractiveTransition
16 |
17 | /**
18 | The animation duration.
19 | */
20 | @property (assign, nonatomic) NSTimeInterval animationDuration;
21 |
22 | /**
23 | Direction of the transition.
24 | */
25 | @property (assign, nonatomic) NSInteger type;
26 |
27 | /**
28 | Whether the animation should be reverse.
29 | */
30 | @property (assign, nonatomic) BOOL reverse;
31 |
32 | /**
33 | Whether the transition is modal.
34 | */
35 | @property (assign, nonatomic) BOOL modalTransition;
36 |
37 | /**
38 | Whether the interaction is in progress.
39 | */
40 | @property (assign, nonatomic) BOOL interactionInProgress;
41 |
42 | /**
43 | The view controller from which the transition starts.
44 | */
45 | @property (strong, nonatomic) UIViewController *fromViewController;
46 |
47 | /**
48 | The view controller at which the transition ends.
49 | */
50 | @property (strong, nonatomic) UIViewController *toViewController;
51 |
52 | /**
53 | The gesture that is added for the interaction.
54 | Make sure this is removed when no longer necessary.
55 | */
56 | @property (strong, nonatomic) UIGestureRecognizer *gesture;
57 |
58 |
59 | /** Helper method for animating transition
60 | @param transitionContext The context object containing information about the transition.
61 | @param fromView The view to be hidden
62 | @param toView The view to be displayed
63 | */
64 | - (void)animateTransition:(id)transitionContext fromView:(UIView*)fromView toView:(UIView*)toView;
65 |
66 | /** Helper method for enabling interactive transition
67 | */
68 | - (void)setInteractionEnabled;
69 | @end
70 |
--------------------------------------------------------------------------------
/Source/CCNavigationController.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCNavigationController.m
3 | // CCTransitionAnimation
4 | // https://github.com/xiongcaichang/CCTransition
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import "CCNavigationController.h"
10 |
11 | @implementation CCNavigationController
12 |
13 | #pragma mark - Init methods
14 |
15 | - (id)initWithRootViewController:(UIViewController *)rootViewController withAnimation:(CCBaseAnimation *)animation
16 | {
17 | self = [super initWithRootViewController:rootViewController];
18 | if (self){
19 | self.delegate = self;
20 | self.animationController = animation;
21 | }
22 | return self;
23 | }
24 |
25 | - (id)initWithRootViewController:(UIViewController *)rootViewController
26 | {
27 | self = [super initWithRootViewController:rootViewController];
28 | if (self){
29 | self.delegate = self;
30 | }
31 | return self;
32 | }
33 |
34 | - (id)initWithCoder:(NSCoder *)aDecoder {
35 | self = [super initWithCoder:aDecoder];
36 | if (self) {
37 | self.delegate = self;
38 | }
39 | return self;
40 | }
41 |
42 |
43 | #pragma mark - UINavigationControllerDelegate
44 |
45 | - (id)navigationController:(UINavigationController *)navigationController animationControllerForOperation:(UINavigationControllerOperation)operation fromViewController:(UIViewController *)fromVC toViewController:(UIViewController *)toVC{
46 |
47 | self.animationController.fromViewController = fromVC;
48 | self.animationController.toViewController = toVC;
49 |
50 | if (self.interactionEnabled){
51 | [self.animationController setInteractionEnabled];
52 | }
53 |
54 | if (operation == UINavigationControllerOperationPop) {
55 | self.animationController.reverse = YES;
56 | } else {
57 | self.animationController.reverse = NO;
58 | }
59 |
60 | return self.animationController;
61 | }
62 |
63 | - (id )navigationController:(UINavigationController *)navigationController interactionControllerForAnimationController:(id ) animationController
64 | {
65 | return self.interactionEnabled && self.animationController.interactionInProgress ? self.animationController : nil;
66 | }
67 |
68 | @end
69 |
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo/CCPushedViewController.xib:
--------------------------------------------------------------------------------
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 |
--------------------------------------------------------------------------------
/Source/CCViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCViewController.m
3 | // CCTransitionAnimation
4 | //https://github.com/xiongcaichang/CCTransition
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import "CCViewController.h"
10 |
11 | @interface CCViewController ()
12 |
13 | @end
14 |
15 | @implementation CCViewController
16 |
17 | #pragma mark - Init methods
18 |
19 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
20 | {
21 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
22 | if (self) {
23 |
24 | }
25 | return self;
26 | }
27 |
28 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil withAnimation:(CCBaseAnimation *) animation
29 | {
30 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
31 | if (self) {
32 | self.transitioningDelegate = self;
33 | self.animationController = animation;
34 | }
35 | return self;
36 | }
37 |
38 | - (void)viewDidLoad
39 | {
40 | [super viewDidLoad];
41 |
42 | if ([self respondsToSelector:@selector(setTransitioningDelegate:)]){
43 | self.transitioningDelegate = self;
44 | }
45 | }
46 |
47 | #pragma mark - UIViewControllerTransitioningDelegate
48 |
49 | - (id)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source
50 | {
51 | self.animationController.fromViewController = presenting;
52 | self.animationController.toViewController = presented;
53 | if (self.interactionEnabled){
54 | [self.animationController setInteractionEnabled];
55 | }
56 | self.animationController.reverse = NO;
57 | self.animationController.modalTransition = YES;
58 | return self.animationController;
59 | }
60 |
61 | - (id)animationControllerForDismissedController:(UIViewController *)dismissed
62 | {
63 | self.animationController.reverse = YES;
64 | self.animationController.modalTransition = YES;
65 | return self.animationController;
66 | }
67 |
68 | - (id)interactionControllerForDismissal:(id)animator
69 | {
70 | return self.interactionEnabled && self.animationController.interactionInProgress ? self.animationController : nil;
71 | }
72 |
73 | - (id)interactionControllerForPresentation:(id)animator
74 | {
75 | return self.interactionEnabled && self.animationController.interactionInProgress ? self.animationController : nil;
76 | }
77 |
78 |
79 | @end
80 |
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // CCTransitionAnimation
4 | //
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "CCMainViewController.h"
11 | #import "CCNavigationController.h"
12 |
13 | @implementation AppDelegate
14 |
15 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
16 | {
17 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
18 | // Override point for customization after application launch.
19 |
20 | CCMainViewController *viewController = [[CCMainViewController alloc] initWithNibName:@"CCMainViewController" bundle:nil];
21 | CCNavigationController *navigationController = [[CCNavigationController alloc] initWithRootViewController:viewController];
22 | [[navigationController navigationBar] setTranslucent:NO];
23 | self.window.rootViewController = navigationController;
24 |
25 | self.window.backgroundColor = [UIColor whiteColor];
26 | [self.window makeKeyAndVisible];
27 | return YES;
28 |
29 | }
30 |
31 | - (void)applicationWillResignActive:(UIApplication *)application
32 | {
33 | // 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.
34 | // 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.
35 | }
36 |
37 | - (void)applicationDidEnterBackground:(UIApplication *)application
38 | {
39 | // 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.
40 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
41 | }
42 |
43 | - (void)applicationWillEnterForeground:(UIApplication *)application
44 | {
45 | // 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.
46 | }
47 |
48 | - (void)applicationDidBecomeActive:(UIApplication *)application
49 | {
50 | // 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.
51 | }
52 |
53 | - (void)applicationWillTerminate:(UIApplication *)application
54 | {
55 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
56 | }
57 |
58 | @end
59 |
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo/CCModalViewController.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/Source/AnimationControllers/CCScaleAnimation.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCScaleAnimation.m
3 | // CCTransitionAnimation
4 | //
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import "CCScaleAnimation.h"
10 |
11 | @implementation CCScaleAnimation
12 |
13 | #pragma mark - Init methods
14 |
15 | - (id) init
16 | {
17 | self = [super init];
18 | if (self){
19 | self.animationDuration = 0.3; // make animation faster than default
20 | }
21 |
22 | return self;
23 | }
24 |
25 | - (instancetype) initWithType:(CCScaleAnimationType)type
26 | {
27 | self = [super init];
28 | if (self){
29 | self.type = type;
30 | self.animationDuration = 0.3; // make animation faster than default
31 | }
32 | return self;
33 | }
34 |
35 |
36 | #pragma mark - Overriden method
37 |
38 | - (void) animateTransition:(id)transitionContext fromView:(UIView *)fromView toView:(UIView *)toView
39 | {
40 | NSTimeInterval duration = [self transitionDuration:transitionContext];
41 |
42 | //Get references to the view hierarchy
43 | UIView *containerView = [transitionContext containerView];
44 |
45 | CGFloat zoomingScale = (self.type == CCScaleAnimationFadeIn) ? 0.8 : 2.0;
46 | CGFloat springScale = (self.type == CCScaleAnimationFadeIn) ? 1.2 : 2.2;
47 |
48 | if (!self.reverse) {
49 | //Add 'to' view to the hierarchy with zooming scale
50 | toView.transform = CGAffineTransformMakeScale(zoomingScale, zoomingScale);
51 | [containerView insertSubview:toView aboveSubview:fromView];
52 |
53 | //Scale the 'to' view to to its final position
54 | [UIView animateKeyframesWithDuration:duration delay:0.0 options:0 animations:^{
55 | [UIView addKeyframeWithRelativeStartTime:0.0 relativeDuration:0.3 animations:^{
56 | toView.transform = CGAffineTransformMakeScale(springScale, springScale);
57 | }];
58 | [UIView addKeyframeWithRelativeStartTime:0.3 relativeDuration:0.7 animations:^{
59 | toView.transform = CGAffineTransformMakeScale(1.0, 1.0);
60 | }];
61 | }completion:^(BOOL finished){
62 | [transitionContext completeTransition:YES];
63 | }];
64 |
65 | } else{
66 | //Add 'to' view to the hierarchy
67 | [containerView insertSubview:toView belowSubview:fromView];
68 |
69 | //Scale the 'from' view down until it disappears
70 | [UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{
71 | fromView.transform = CGAffineTransformMakeScale(zoomingScale, zoomingScale);
72 | fromView.alpha = 0.0;
73 | } completion:^(BOOL finished) {
74 | [transitionContext completeTransition:YES];
75 | fromView.transform = CGAffineTransformMakeScale(1.0, 1.0);
76 | fromView.alpha = 1.0;
77 | }];
78 | }
79 |
80 |
81 | }
82 |
83 |
84 |
85 | @end
86 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | # CCTransition 快速自定义转场动画
4 |
5 |
6 | [](http://cocoadocs.org/docsets/CCTransition/)
7 | [](http://cocoadocs.org/docsets/CCTransition/)
8 | [](https://www.apache.org/licenses/LICENSE-2.0.html)
9 | [](https://www.apple.com/nl/ios/)
10 |
11 |
12 | ###截图
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | ## 开始(Getting started)
24 |
25 | * 使用 cocopods ( Using CocoaPods)
26 |
27 |
28 | ```
29 | pod 'CCTransition', '~> 1.0.0'
30 | ```
31 |
32 |
33 | * 常规使用 (Using narmal)
34 |
35 | 将 CCTransition 文件夹拖入项目
36 |
37 | ### Basic usage
38 |
39 | 1. 自定义导航控制器转场
40 |
41 | 创建一个 `CCNavigationController` 实例
42 | 给控制器设置一种转场类型
43 |
44 |
45 | ```objc
46 |
47 | CCNavigationController *navigationController = [[CCNavigationController alloc] initWithRootViewController:viewController];
48 |
49 | CCLayerAnimation *layerAnimation = [[CCLayerAnimation alloc] initWithType:CCLayerAnimationCover];
50 | navigationController.animationController = layerAnimation;
51 | ```
52 |
53 | 如果你是用 storyBord, 请确保你的控制器被 `CCNavigationController`管理
54 |
55 | * 使用方法, 你可以在 `viewDidLoad` 添加以下代码
56 |
57 | ```objc
58 | //初始化控制器
59 | CCNavigationController *fancyNavigationController = (CCNavigationController *)self.navigationController;
60 | //初始化动画效果
61 | CCLayerAnimation *layerAnimation = [[CCLayerAnimation alloc] initWithType:CCLayerAnimationCover];
62 | //设置动画效果
63 | fancyNavigationController.animationController = layerAnimation;
64 | ```
65 |
66 | 2. 自定义 Modal 转场
67 |
68 | 确保你用来 modal 的控制器是 `CCViewController` 的子类
69 |
70 |
71 | ```objc
72 |
73 | //初始化用来 modal 操作控制器 一般是 self
74 | CCMainViewController *mainController = [[CCMainViewController alloc] initWithNibName:@"CCMainViewController" bundle:nil];
75 | //初始化动画效果
76 | CCSlideAnimation *slideAnimation = [[CCSlideAnimation alloc] init];
77 | slideAnimation.type = CCSlideAnimationFromTop;
78 | //设置动画效果
79 | mainController.animationController = slideAnimation;
80 |
81 |
82 | //初始化被 Modal 出的控制器
83 | CCModalViewController *modalController = [[CCModalViewController alloc] initWithNibName:@"CCModalViewController" bundle:nil];
84 | //设置代理
85 | modalController.transitioningDelegate = mainController.transitioningDelegate;
86 |
87 | //进行 Modal 操作
88 | [modalController.navigationController presentViewController:viewController animated:YES completion:nil];
89 |
90 | ```
91 |
92 |
93 | 3. 交互
94 |
95 |
96 | ```objc
97 |
98 |
99 | navigationController.interactionEnabled = YES;
100 |
101 |
102 | mainViewController.interactionEnabled = YES;
103 | ```
104 |
--------------------------------------------------------------------------------
/Source/AnimationControllers/CCFlipAnimation.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCFlipAnimation.m
3 | // CCTransitionAnimation
4 | //
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import "CCFlipAnimation.h"
10 |
11 | @interface CCFlipAnimation()
12 |
13 | @end
14 |
15 | @implementation CCFlipAnimation
16 |
17 | #pragma mark - Init methods
18 |
19 | - (instancetype) init
20 | {
21 | self = [super init];
22 | if (self){
23 | self.animationDuration = 1.5;
24 | }
25 |
26 | return self;
27 | }
28 |
29 | - (instancetype)initWithType:(CCFlipAnimationType)type
30 | {
31 | self = [super init];
32 | if (self){
33 | self.animationDuration = 1.5;
34 | self.type = type;
35 | }
36 | return self;
37 | }
38 |
39 |
40 | #pragma mark - Override transition animation
41 |
42 | - (void) animateTransition:(id)transitionContext fromView:(UIView *)fromView toView:(UIView *)toView
43 | {
44 | // Set reverse type
45 | if (self.reverse){
46 | switch (self.type) {
47 | case CCFlipAnimationLeft:
48 | self.type = CCFlipAnimationRight;
49 | break;
50 | case CCFlipAnimationRight:
51 | self.type = CCFlipAnimationLeft;
52 | break;
53 | case CCFlipAnimationTop:
54 | self.type = CCFlipAnimationBottom;
55 | break;
56 | case CCFlipAnimationBottom:
57 | self.type = CCFlipAnimationTop;
58 | break;
59 | }
60 | }
61 |
62 | //Get references to the view hierarchy
63 | UIView *containerView = [transitionContext containerView];
64 | [containerView addSubview:toView];
65 |
66 | // Add a perspective transform
67 | CATransform3D transform = CATransform3DIdentity;
68 | transform.m34 = -0.002;
69 | [containerView.layer setSublayerTransform:transform];
70 |
71 | // Give both VCs the same start frame
72 | CGRect initialFrame;
73 | if (self.modalTransition){
74 | initialFrame = containerView.frame;
75 | } else {
76 | initialFrame = [transitionContext initialFrameForViewController:self.fromViewController];
77 | }
78 |
79 | fromView.frame = initialFrame;
80 | toView.frame = initialFrame;
81 |
82 | // reverse?
83 | float factor = (self.type == CCFlipAnimationLeft || self.type == CCFlipAnimationTop) ? -1.0 : 1.0;
84 |
85 | // flip the to VC halfway round - hiding it
86 | toView.layer.transform = [self rotate:factor * -M_PI_2];
87 | toView.alpha = 0.0;
88 |
89 | // animate
90 | NSTimeInterval duration = [self transitionDuration:transitionContext];
91 | [UIView animateKeyframesWithDuration:duration delay:0.0 options:0 animations:^{
92 | [UIView addKeyframeWithRelativeStartTime:0.0 relativeDuration:0.2 animations:^{
93 | // rotate the from view
94 | fromView.layer.transform = [self rotate:factor * -M_PI_2/8];
95 | }];
96 | [UIView addKeyframeWithRelativeStartTime:0.2 relativeDuration:0.3 animations:^{
97 | // rotate the from view
98 | fromView.layer.transform = [self rotate:factor * M_PI_2];
99 | fromView.alpha = 0.0;
100 | }];
101 | [UIView addKeyframeWithRelativeStartTime:0.5 relativeDuration:0.3 animations:^{
102 | // rotate the to view
103 | toView.layer.transform = [self rotate:factor * M_PI_2/8];
104 | toView.alpha = 1.0;
105 | }];
106 | [UIView addKeyframeWithRelativeStartTime:0.8 relativeDuration:0.2 animations:^{
107 | // rotate the to view
108 | toView.layer.transform = CATransform3DIdentity;
109 | }];
110 | } completion:^(BOOL finished) {
111 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]];
112 | fromView.alpha = 1.0;
113 | fromView.layer.transform = CATransform3DIdentity;
114 | }];
115 |
116 | }
117 |
118 |
119 | #pragma mark - Helper method
120 |
121 | - (CATransform3D) rotate:(CGFloat) angle {
122 | if (self.type == CCFlipAnimationLeft || self.type == CCFlipAnimationRight){
123 | return CATransform3DMakeRotation(angle, 0.0, 1.0, 0.0);
124 | } else{
125 | return CATransform3DMakeRotation(angle, 1.0, 0.0, 0.0);
126 | }
127 |
128 | }
129 |
130 | @end
131 |
--------------------------------------------------------------------------------
/Source/AnimationControllers/CCSlideAnimation.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCBounceAnimation.m
3 | // CCTransitionAnimation
4 | //
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import "CCSlideAnimation.h"
10 | #import "CCNavigationController.h"
11 |
12 | @interface CCSlideAnimation()
13 | @property (assign, nonatomic) BOOL shouldCompleteTransition;
14 | @end
15 |
16 | @implementation CCSlideAnimation
17 |
18 | #pragma mark - Init methods
19 |
20 | - (instancetype) init
21 | {
22 | self = [super init];
23 | if (self){
24 | self.damping = 0.8;
25 | self.velocity = 1.0;
26 | }
27 | return self;
28 | }
29 |
30 | - (instancetype) initWithType:(CCSlideAnimationType)type
31 | {
32 | self = [super init];
33 | if (self){
34 | self.type = type;
35 | self.damping = 0.8;
36 | self.velocity = 1.0;
37 | }
38 | return self;
39 | }
40 |
41 |
42 | #pragma mark - Overriden methods
43 |
44 | - (void)animateTransition:(id)transitionContext fromView:(UIView *)fromView toView:(UIView *)toView
45 | {
46 | UIView *containerView = [transitionContext containerView];
47 |
48 | CGPoint temporaryPoint = CGPointZero;
49 | CGPoint centerPoint = toView.center;
50 |
51 | switch (self.type) {
52 | case CCSlideAnimationFromBottom:
53 | temporaryPoint = CGPointMake(CGRectGetMidX(fromView.frame), 1.5*CGRectGetMaxY(fromView.frame));
54 | break;
55 | case CCSlideAnimationFromTop:
56 | temporaryPoint = CGPointMake(CGRectGetMidX(fromView.frame), -CGRectGetMaxY(fromView.frame));
57 | break;
58 | case CCSlideAnimationFromLeft:
59 | temporaryPoint = CGPointMake(-CGRectGetMaxX(fromView.frame), CGRectGetMidY(fromView.frame));
60 | break;
61 | case CCSlideAnimationFromRight:
62 | temporaryPoint = CGPointMake(1.5*CGRectGetMaxX(fromView.frame), CGRectGetMidY(fromView.frame));
63 | break;
64 | default:
65 | break;
66 | }
67 |
68 | if (self.reverse){
69 | [containerView addSubview:toView];
70 | [containerView sendSubviewToBack:toView];
71 | } else {
72 | [containerView addSubview:toView];
73 | [containerView bringSubviewToFront:toView];
74 | toView.center = temporaryPoint;
75 | }
76 |
77 | //Animate using spring animation
78 | [UIView animateWithDuration:[self transitionDuration:transitionContext] delay:0.0 usingSpringWithDamping:self.damping initialSpringVelocity:self.velocity options:0 animations:^{
79 | if (self.reverse){
80 | fromView.center = temporaryPoint;
81 | } else {
82 | toView.center = centerPoint;
83 | }
84 |
85 | } completion:^(BOOL finished) {
86 | [transitionContext completeTransition:![transitionContext transitionWasCancelled]];
87 | [fromView removeFromSuperview];
88 | }];
89 |
90 | }
91 |
92 | - (void)setInteractionEnabled
93 | {
94 | self.gesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)];
95 | [self.toViewController.view addGestureRecognizer:self.gesture];
96 | }
97 |
98 |
99 | #pragma mark - Helper methods
100 |
101 | - (void) handleGesture:(UIPanGestureRecognizer*)gestureRecognizer
102 | {
103 | CGPoint translation = [gestureRecognizer translationInView:gestureRecognizer.view.superview];
104 | CGPoint vel = [gestureRecognizer velocityInView:gestureRecognizer.view];
105 |
106 | BOOL horizontalPan = (self.type == CCSlideAnimationFromLeft || self.type == CCSlideAnimationFromRight);
107 |
108 | switch (gestureRecognizer.state) {
109 | case UIGestureRecognizerStateBegan: {
110 |
111 | BOOL rightToLeftSwipe = vel.x < 0;
112 | BOOL leftToRightSwipe = vel.x > 0;
113 | BOOL topToBottomSwipe = translation.y > 0;
114 | BOOL bottomToTopSwipe = translation.y < 0;
115 |
116 | // perform the required navigation operation ...
117 | if (horizontalPan){
118 | if ((self.type == CCSlideAnimationFromLeft && rightToLeftSwipe) ||
119 | (self.type == CCSlideAnimationFromRight && leftToRightSwipe)){
120 | [self dismissViewController];
121 | }
122 | } else {
123 | if ((self.type == CCSlideAnimationFromTop && bottomToTopSwipe) ||
124 | (self.type == CCSlideAnimationFromBottom && topToBottomSwipe)){
125 | [self dismissViewController];
126 | }
127 | }
128 |
129 | break;
130 | }
131 | case UIGestureRecognizerStateChanged: {
132 | if (self.interactionInProgress) {
133 | CGFloat fraction = 0;
134 |
135 | if (horizontalPan){
136 | // compute the current position
137 | fraction = fabs(translation.x / 200.0);
138 | fraction = fminf(fmaxf(fraction, 0.0), 1.0);
139 | self.shouldCompleteTransition = (fraction > 0.5);
140 |
141 | } else {
142 | // compute the current position
143 | fraction = fabs(translation.y / 200.0);
144 | fraction = fminf(fmaxf(fraction, 0.0), 1.0);
145 | self.shouldCompleteTransition = (fraction > 0.5);
146 | }
147 |
148 | if (fraction >= 1.0){
149 | fraction = 0.99;
150 | }
151 |
152 | [self updateInteractiveTransition:fraction];
153 | }
154 | break;
155 | }
156 | case UIGestureRecognizerStateEnded:
157 | case UIGestureRecognizerStateCancelled:
158 | if (self.interactionInProgress) {
159 | self.interactionInProgress = NO;
160 | if (!self.shouldCompleteTransition || gestureRecognizer.state == UIGestureRecognizerStateCancelled) {
161 | [self cancelInteractiveTransition];
162 | } else {
163 | [self finishInteractiveTransition];
164 | }
165 | }
166 | break;
167 | default:
168 | break;
169 | }
170 |
171 | }
172 |
173 | - (void)dismissViewController
174 | {
175 | if (self.modalTransition){
176 | [self.toViewController dismissViewControllerAnimated:YES completion:nil];
177 | } else {
178 | [self.toViewController.navigationController popViewControllerAnimated:YES];
179 | }
180 | }
181 |
182 | @end
--------------------------------------------------------------------------------
/Source/AnimationControllers/CCLayerAnimation.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCLayerAnimation.m
3 | // CCTransitionAnimation
4 | //
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import "CCLayerAnimation.h"
10 |
11 | @implementation CCLayerAnimation
12 |
13 | #pragma mark - Init method
14 |
15 | - (instancetype)initWithType:(CCLayerAnimationType)type
16 | {
17 | self = [super init];
18 | if (self){
19 | self.type = type;
20 | }
21 | return self;
22 | }
23 |
24 |
25 | #pragma mark - Overriden method
26 |
27 | - (void) animateTransition:(id)transitionContext fromView:(UIView *)fromView toView:(UIView *)toView
28 | {
29 | UIView *containerView = [transitionContext containerView];
30 |
31 | switch (self.type) {
32 | case CCLayerAnimationReveal:
33 | [self executeRevealAnimationIn:containerView from:fromView to:toView withContext:transitionContext];
34 | break;
35 |
36 | case CCLayerAnimationCover:
37 | [self executeCoverAnimationIn:containerView from:fromView to:toView withContext:transitionContext];
38 | break;
39 | }
40 | }
41 |
42 |
43 | #pragma mark - Helper methods
44 |
45 | - (void) executeRevealAnimationIn:(UIView *)containerView from:(UIView *)fromView to:(UIView *)toView withContext:(id)transitionContext
46 | {
47 |
48 | [containerView addSubview:toView];
49 | [containerView addSubview:fromView];
50 |
51 | CGPoint temporaryPoint = CGPointMake(-CGRectGetMaxX(toView.frame), CGRectGetMidY(toView.frame));
52 | CGPoint centerPoint = toView.center;
53 |
54 | if (self.reverse){
55 | toView.center = temporaryPoint;
56 | [UIView animateWithDuration:self.animationDuration/2 animations:^{
57 | fromView.transform = CGAffineTransformMakeScale(0.8, 0.8);
58 | fromView.alpha = 0.3;
59 | } completion:^(BOOL finished){
60 | }];
61 |
62 | [UIView animateWithDuration:self.animationDuration delay:(self.animationDuration/8) usingSpringWithDamping:0.8f initialSpringVelocity:1.0f options:UIViewAnimationOptionCurveEaseIn animations:^{
63 | toView.center = centerPoint;
64 | fromView.alpha = 0;
65 | } completion:^(BOOL finished) {
66 | [transitionContext completeTransition:YES];
67 | [fromView removeFromSuperview];
68 | }];
69 | } else {
70 | toView.alpha = 0.3;
71 | toView.transform = CGAffineTransformMakeScale(0.8, 0.8);
72 | [UIView animateWithDuration:self.animationDuration animations:^{
73 | fromView.center = temporaryPoint;
74 | toView.transform = CGAffineTransformIdentity;
75 | toView.alpha = 1.0;
76 | } completion:^(BOOL finished){
77 | [transitionContext completeTransition:YES];
78 | [fromView removeFromSuperview];
79 | }];
80 |
81 | }
82 | }
83 |
84 | - (void) executeCoverAnimationIn:(UIView *)containerView from:(UIView *)fromView to:(UIView *)toView withContext:(id)transitionContext
85 | {
86 | CATransform3D t1 = CATransform3DIdentity;
87 | t1.m34 = 1.0/-900;
88 | t1 = CATransform3DScale(t1, 0.95, 0.95, 1);
89 | t1 = CATransform3DRotate(t1, 15.0f*M_PI/180.0f, 1, 0, 0);
90 |
91 | CATransform3D t2 = CATransform3DIdentity;
92 | t2.m34 = t1.m34;
93 | t2 = CATransform3DTranslate(t2, 0, fromView.frame.size.height*-0.08, 0);
94 | t2 = CATransform3DScale(t2, 0.8, 0.8, 1);
95 |
96 | if (!self.reverse){
97 | CGRect offScreenFrame = containerView.frame;
98 | offScreenFrame.origin.y = containerView.frame.size.height;
99 | toView.frame = offScreenFrame;
100 |
101 | [containerView insertSubview:toView aboveSubview:fromView];
102 |
103 | CFTimeInterval duration = self.animationDuration;
104 | CFTimeInterval halfDuration = duration/2;
105 |
106 | [UIView animateKeyframesWithDuration:halfDuration delay:0.0 options:UIViewKeyframeAnimationOptionCalculationModeLinear animations:^{
107 |
108 | [UIView addKeyframeWithRelativeStartTime:0.0f relativeDuration:0.5f animations:^{
109 | fromView.layer.transform = t1;
110 | fromView.alpha = 0.6;
111 | }];
112 |
113 | [UIView addKeyframeWithRelativeStartTime:0.5f relativeDuration:0.5f animations:^{
114 | fromView.layer.transform = t2;
115 | }];
116 |
117 | } completion:^(BOOL finished) {
118 | }];
119 |
120 |
121 | [UIView animateWithDuration:duration delay:(halfDuration - (0.3*halfDuration)) usingSpringWithDamping:0.7f initialSpringVelocity:6.0f options:UIViewAnimationOptionCurveEaseIn animations:^{
122 |
123 | toView.frame = containerView.frame;
124 |
125 | } completion:^(BOOL finished) {
126 | [transitionContext completeTransition:YES];
127 | }];
128 |
129 | } else {
130 | if (self.modalTransition){
131 | toView.frame = containerView.frame;
132 | }
133 |
134 | CATransform3D scale = CATransform3DIdentity;
135 | toView.layer.transform = CATransform3DScale(scale, 0.6, 0.6, 1);
136 | toView.alpha = 0.6;
137 |
138 | [containerView insertSubview:toView belowSubview:fromView];
139 |
140 | CGRect frameOffScreen = containerView.frame;
141 | frameOffScreen.origin.y = containerView.frame.size.height;
142 |
143 | NSTimeInterval duration = self.animationDuration;
144 | NSTimeInterval halfDuration = duration/2;
145 |
146 |
147 | [UIView animateKeyframesWithDuration:halfDuration delay:halfDuration - (0.3*halfDuration) options:UIViewKeyframeAnimationOptionCalculationModeLinear animations:^{
148 |
149 | [UIView addKeyframeWithRelativeStartTime:0.0f relativeDuration:0.5f animations:^{
150 | toView.layer.transform = t1;
151 | toView.alpha = 1.0;
152 | }];
153 |
154 | [UIView addKeyframeWithRelativeStartTime:0.5f relativeDuration:0.5f animations:^{
155 |
156 | toView.layer.transform = CATransform3DIdentity;
157 | }];
158 |
159 | } completion:^(BOOL finished) {
160 | [transitionContext completeTransition:YES];
161 | }];
162 |
163 |
164 | [UIView animateWithDuration:halfDuration animations:^{
165 | fromView.frame = frameOffScreen;
166 | } completion:^(BOOL finished) {
167 |
168 | }];
169 |
170 | }
171 |
172 | }
173 |
174 | @end
175 |
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo/CCMainViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // CCMainViewController.m
3 | // CCTransitionAnimation
4 | //https://github.com/xiongcaichang/CCTransition
5 | // Created by bear on 5/7/16.
6 | // Copyright (c) 2016 bear. All rights reserved.
7 | //
8 |
9 | #import "CCMainViewController.h"
10 | #import "CCModalViewController.h"
11 | #import "CCPushedViewController.h"
12 | #import "CCNavigationController.h"
13 | #import "CCViewController.h"
14 |
15 | @interface CCMainViewController ()
16 |
17 | @property (strong, nonatomic) NSArray *animations;
18 | @property (strong, nonatomic) NSArray *textFields;
19 | @property (assign, nonatomic) NSInteger selectedNavigationAnimation;
20 | @property (assign, nonatomic) NSInteger selectedNavigationType;
21 | @property (assign, nonatomic) NSInteger selectedModalAnimation;
22 | @property (assign, nonatomic) NSInteger selectedModalType;
23 |
24 | @end
25 |
26 | #define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height
27 | #define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width
28 |
29 | @implementation CCMainViewController
30 |
31 |
32 |
33 | - (IBAction)navigationButtonTapped:(id)sender {
34 | CCPushedViewController *viewController = [[CCPushedViewController alloc] initWithNibName:@"CCPushedViewController" bundle:nil];
35 |
36 |
37 | //初始化导航控制器
38 | CCNavigationController *fancyNavigationController = (CCNavigationController *) self.navigationController;
39 |
40 |
41 | //根据选中的索引确定动画类型
42 | if (self.selectedNavigationAnimation == 0){
43 | fancyNavigationController.animationController = nil;
44 | } else {
45 | fancyNavigationController.interactionEnabled = YES;
46 | NSString *className = [NSString stringWithFormat:@"CC%@Animation", [[self.animations objectAtIndex:self.selectedNavigationAnimation] objectForKey:@"name"]];
47 | id transitionInstance = [[NSClassFromString(className) alloc] init];
48 |
49 | //设置动画
50 | fancyNavigationController.animationController = transitionInstance;
51 | fancyNavigationController.animationController.type = self.selectedNavigationType;
52 | }
53 |
54 |
55 |
56 | [self.navigationController pushViewController:viewController animated:YES];
57 | }
58 |
59 | - (IBAction)modalButtonTapped:(id)sender {
60 |
61 | CCModalViewController *viewController = [[CCModalViewController alloc] initWithNibName:@"CCModalViewController" bundle:nil];
62 |
63 | CCViewController *fancyViewController = (CCViewController *) self;
64 |
65 |
66 | if (self.selectedModalAnimation == 0){
67 | fancyViewController.animationController = nil;
68 | } else {
69 | fancyViewController.interactionEnabled = YES;
70 | NSString *className = [NSString stringWithFormat:@"CC%@Animation", [[self.animations objectAtIndex:self.selectedModalAnimation] objectForKey:@"name"]];
71 | id transitionInstance = [[NSClassFromString(className) alloc] init];
72 | fancyViewController.animationController = transitionInstance;
73 | fancyViewController.animationController.type = self.selectedModalType;
74 | }
75 |
76 | if ([self respondsToSelector:@selector(setTransitioningDelegate:)]){
77 | viewController.transitioningDelegate = self.transitioningDelegate;
78 | }
79 |
80 | [self.navigationController presentViewController:viewController animated:YES completion:nil];
81 |
82 |
83 | }
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
92 | {
93 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
94 | if (self) {
95 |
96 |
97 | //初始化代码
98 | }
99 | return self;
100 | }
101 |
102 | - (void)viewDidLoad
103 | {
104 | [super viewDidLoad];
105 | self.title = @"神奇的转场动画";
106 |
107 | self.textFields = @[self.navigationField, self.typeNavigationField,
108 | self.modalField, self.typeModalField];
109 |
110 | for (UITextField *textField in self.textFields){
111 | textField.delegate = self;
112 | }
113 |
114 |
115 | [self.pickerView setTag:0];
116 | [self.pickerView setDataSource:self];
117 | [self.pickerView setDelegate:self];
118 | [self.optionView setFrame:CGRectMake(0, SCREEN_HEIGHT, CGRectGetWidth(self.optionView.frame), CGRectGetHeight(self.optionView.frame))];
119 | [self.optionView setAlpha:0.0];
120 | [self.view addSubview:self.optionView];
121 | [self.view bringSubviewToFront:self.optionView];
122 |
123 | [self.scrollView setContentSize:self.contentView.frame.size];
124 | [self.scrollView addSubview:self.contentView];
125 |
126 | [self.doneButton setTarget:self];
127 | [self.doneButton setAction:@selector(exitEditingMode)];
128 |
129 | self.animations = @[@{@"name": @"Default"},
130 | @{@"name": @"Slide",
131 | @"types": @[@"From Left", @"From Right", @"From Top", @"From Bottom"]},
132 | @{@"name": @"Scale",
133 | @"types": @[@"Fade In", @"Drop In"]},
134 | @{@"name": @"Layer",
135 | @"types": @[@"Cover", @"Reveal"]},
136 | @{@"name": @"Flip",
137 | @"types": @[@"From Left", @"From Right", @"From Top", @"From Bottom"]}];
138 | }
139 |
140 | - (void) viewWillDisappear:(BOOL)animated
141 | {
142 | [super viewWillDisappear:animated];
143 | [self exitEditingMode];
144 | }
145 |
146 | - (void) exitEditingMode
147 | {
148 | NSInteger row = [self.pickerView selectedRowInComponent:0];
149 | [self pickerView:self.pickerView didSelectRow:row inComponent:0];
150 |
151 | switch (self.pickerView.tag + 100) {
152 | case 100:
153 | self.selectedNavigationAnimation = row;
154 | self.selectedNavigationType = 0;
155 | break;
156 | case 101:
157 | self.selectedNavigationType = row;
158 | break;
159 | case 102:
160 | self.selectedModalAnimation = row;
161 | self.selectedModalType = 0;
162 | break;
163 | case 103:
164 | self.selectedModalType = row;
165 | break;
166 | default:
167 | break;
168 | }
169 |
170 | [UIView animateWithDuration:0.5 animations:^{
171 | [self.optionView setFrame:CGRectMake(0, SCREEN_HEIGHT, CGRectGetWidth(self.optionView.frame), CGRectGetHeight(self.optionView.frame))];
172 | } completion:^(BOOL finished){
173 | if (finished){
174 | [self.optionView setAlpha:0.0];
175 | }
176 | }];
177 | }
178 |
179 |
180 | #pragma mark - UIPickerViewDatasource
181 |
182 | - (NSInteger) pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component
183 | {
184 | if (pickerView.tag%2 != 0){
185 | UITextField *previousTextField = [self.textFields objectAtIndex:pickerView.tag-1];
186 | for (NSDictionary *animation in self.animations){
187 | if ([[animation objectForKey:@"name"] isEqualToString:[previousTextField text]]){
188 | return [[animation objectForKey:@"types"] count];
189 | }
190 | }
191 | }
192 |
193 | return [self.animations count];
194 | }
195 |
196 | - (NSInteger) numberOfComponentsInPickerView:(UIPickerView *)pickerView
197 | {
198 | return 1;
199 | }
200 |
201 |
202 | #pragma mark - UIPickerViewDelegate
203 |
204 | - (NSString *) pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component
205 | {
206 | if (pickerView.tag%2 != 0){
207 | UITextField *previousTextField = [self.textFields objectAtIndex:pickerView.tag-1];
208 | for (NSDictionary *animation in self.animations){
209 | if ([[animation objectForKey:@"name"] isEqualToString:[previousTextField text]]){
210 | return [[animation objectForKey:@"types"] objectAtIndex:row];
211 | }
212 | }
213 | }
214 |
215 | return [[self.animations objectAtIndex:row] objectForKey:@"name"];
216 | }
217 |
218 |
219 | - (void) pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
220 | {
221 | UITextField *textField = [self.textFields objectAtIndex:pickerView.tag];
222 | [textField setText:[self pickerView:pickerView titleForRow:row forComponent:component]];
223 | if (pickerView.tag%2 == 0){
224 | UITextField *nextTextField = [self.textFields objectAtIndex:pickerView.tag+1];
225 | if (row > 0){
226 | [nextTextField setText:[[[self.animations objectAtIndex:row] objectForKey:@"types"] objectAtIndex:0]];
227 | [nextTextField setEnabled:YES];
228 | } else {
229 | [nextTextField setText:@""];
230 | [nextTextField setEnabled:NO];
231 | }
232 |
233 | }
234 |
235 | switch (self.pickerView.tag + 100) {
236 | case 100:
237 | self.selectedNavigationAnimation = row;
238 | break;
239 | case 101:
240 | self.selectedNavigationType = row;
241 | break;
242 | case 102:
243 | self.selectedModalAnimation = row;
244 | break;
245 | case 103:
246 | self.selectedModalType = row;
247 | break;
248 | default:
249 | break;
250 | }
251 |
252 | }
253 |
254 |
255 | #pragma mark - UITextFieldDelegate
256 |
257 | - (BOOL) textFieldShouldBeginEditing:(UITextField *)textField
258 | {
259 | self.pickerView.tag = textField.tag - 100;
260 | [self.pickerView reloadAllComponents];
261 | [self.pickerView selectRow:0 inComponent:0 animated:NO];
262 | [self.optionView setAlpha:1.0];
263 |
264 | CGFloat height = 0;
265 | if (UIDeviceOrientationIsLandscape([UIDevice currentDevice].orientation)){
266 | height = SCREEN_WIDTH;
267 | } else {
268 | height = SCREEN_HEIGHT;
269 | }
270 |
271 | [UIView animateWithDuration:0.5 animations:^{
272 | [self.optionView setFrame:CGRectMake(0, height - CGRectGetHeight(self.optionView.frame), CGRectGetWidth(self.optionView.frame), CGRectGetHeight(self.optionView.frame))];
273 | }];
274 | return NO;
275 | }
276 |
277 | - (BOOL) textFieldShouldReturn:(UITextField *)textField
278 | {
279 | [self exitEditingMode];
280 | return NO;
281 | }
282 |
283 |
284 | #pragma mark - IBAction methods
285 |
286 |
287 |
288 |
289 | @end
290 |
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo/CCMainViewController.xib:
--------------------------------------------------------------------------------
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 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
68 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
121 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
163 |
164 |
165 |
166 |
167 |
168 |
169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 |
180 |
181 |
182 |
183 |
184 |
185 |
186 |
187 |
188 |
189 |
190 |
--------------------------------------------------------------------------------
/CCTransitionDemo/CCTransitionDemo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 09DE33B71D35D9BE00AA6F3C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 09DE33B61D35D9BE00AA6F3C /* LaunchScreen.storyboard */; };
11 | 09DE33B91D35D9E700AA6F3C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 09DE33B81D35D9E700AA6F3C /* Images.xcassets */; };
12 | DE919B781935DDD0001C7616 /* CCBaseAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = DE919B6B1935DDD0001C7616 /* CCBaseAnimation.m */; };
13 | DE919B791935DDD0001C7616 /* CCFlipAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = DE919B6D1935DDD0001C7616 /* CCFlipAnimation.m */; };
14 | DE919B7A1935DDD0001C7616 /* CCLayerAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = DE919B6F1935DDD0001C7616 /* CCLayerAnimation.m */; };
15 | DE919B7B1935DDD0001C7616 /* CCScaleAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = DE919B711935DDD0001C7616 /* CCScaleAnimation.m */; };
16 | DE919B7C1935DDD0001C7616 /* CCSlideAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = DE919B731935DDD0001C7616 /* CCSlideAnimation.m */; };
17 | DE919B7D1935DDD0001C7616 /* CCNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = DE919B751935DDD0001C7616 /* CCNavigationController.m */; };
18 | DE919B7E1935DDD0001C7616 /* CCViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DE919B771935DDD0001C7616 /* CCViewController.m */; };
19 | DEEE73CD1929B1A400200D45 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEEE73CC1929B1A400200D45 /* Foundation.framework */; };
20 | DEEE73CF1929B1A400200D45 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEEE73CE1929B1A400200D45 /* CoreGraphics.framework */; };
21 | DEEE73D11929B1A400200D45 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DEEE73D01929B1A400200D45 /* UIKit.framework */; };
22 | DEEE73D91929B1A400200D45 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DEEE73D81929B1A400200D45 /* main.m */; };
23 | DEEE73DD1929B1A400200D45 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DEEE73DC1929B1A400200D45 /* AppDelegate.m */; };
24 | DEEE741B1929B28000200D45 /* 130930-IPHONE5-IOS7-D.jpg in Resources */ = {isa = PBXBuildFile; fileRef = DEEE741A1929B28000200D45 /* 130930-IPHONE5-IOS7-D.jpg */; };
25 | DEEE74251929B29300200D45 /* CCMainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DEEE741D1929B29300200D45 /* CCMainViewController.m */; };
26 | DEEE74261929B29300200D45 /* CCMainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = DEEE741E1929B29300200D45 /* CCMainViewController.xib */; };
27 | DEEE74271929B29300200D45 /* CCModalViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DEEE74201929B29300200D45 /* CCModalViewController.m */; };
28 | DEEE74281929B29300200D45 /* CCModalViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = DEEE74211929B29300200D45 /* CCModalViewController.xib */; };
29 | DEEE74291929B29300200D45 /* CCPushedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DEEE74231929B29300200D45 /* CCPushedViewController.m */; };
30 | DEEE742A1929B29300200D45 /* CCPushedViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = DEEE74241929B29300200D45 /* CCPushedViewController.xib */; };
31 | /* End PBXBuildFile section */
32 |
33 | /* Begin PBXFileReference section */
34 | 09DE33B61D35D9BE00AA6F3C /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; };
35 | 09DE33B81D35D9E700AA6F3C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
36 | DE919B6A1935DDD0001C7616 /* CCBaseAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCBaseAnimation.h; sourceTree = ""; };
37 | DE919B6B1935DDD0001C7616 /* CCBaseAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCBaseAnimation.m; sourceTree = ""; };
38 | DE919B6C1935DDD0001C7616 /* CCFlipAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCFlipAnimation.h; sourceTree = ""; };
39 | DE919B6D1935DDD0001C7616 /* CCFlipAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCFlipAnimation.m; sourceTree = ""; };
40 | DE919B6E1935DDD0001C7616 /* CCLayerAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCLayerAnimation.h; sourceTree = ""; };
41 | DE919B6F1935DDD0001C7616 /* CCLayerAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCLayerAnimation.m; sourceTree = ""; };
42 | DE919B701935DDD0001C7616 /* CCScaleAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCScaleAnimation.h; sourceTree = ""; };
43 | DE919B711935DDD0001C7616 /* CCScaleAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCScaleAnimation.m; sourceTree = ""; };
44 | DE919B721935DDD0001C7616 /* CCSlideAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCSlideAnimation.h; sourceTree = ""; };
45 | DE919B731935DDD0001C7616 /* CCSlideAnimation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCSlideAnimation.m; sourceTree = ""; };
46 | DE919B741935DDD0001C7616 /* CCNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCNavigationController.h; sourceTree = ""; };
47 | DE919B751935DDD0001C7616 /* CCNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCNavigationController.m; sourceTree = ""; };
48 | DE919B761935DDD0001C7616 /* CCViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCViewController.h; sourceTree = ""; };
49 | DE919B771935DDD0001C7616 /* CCViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCViewController.m; sourceTree = ""; };
50 | DEEE73C91929B1A400200D45 /* CCTransitionDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CCTransitionDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
51 | DEEE73CC1929B1A400200D45 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
52 | DEEE73CE1929B1A400200D45 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
53 | DEEE73D01929B1A400200D45 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
54 | DEEE73D41929B1A400200D45 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
55 | DEEE73D81929B1A400200D45 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
56 | DEEE73DB1929B1A400200D45 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
57 | DEEE73DC1929B1A400200D45 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
58 | DEEE73E51929B1A400200D45 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
59 | DEEE741A1929B28000200D45 /* 130930-IPHONE5-IOS7-D.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "130930-IPHONE5-IOS7-D.jpg"; sourceTree = ""; };
60 | DEEE741C1929B29300200D45 /* CCMainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCMainViewController.h; sourceTree = ""; };
61 | DEEE741D1929B29300200D45 /* CCMainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCMainViewController.m; sourceTree = ""; };
62 | DEEE741E1929B29300200D45 /* CCMainViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CCMainViewController.xib; sourceTree = ""; };
63 | DEEE741F1929B29300200D45 /* CCModalViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCModalViewController.h; sourceTree = ""; };
64 | DEEE74201929B29300200D45 /* CCModalViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCModalViewController.m; sourceTree = ""; };
65 | DEEE74211929B29300200D45 /* CCModalViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CCModalViewController.xib; sourceTree = ""; };
66 | DEEE74221929B29300200D45 /* CCPushedViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CCPushedViewController.h; sourceTree = ""; };
67 | DEEE74231929B29300200D45 /* CCPushedViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CCPushedViewController.m; sourceTree = ""; };
68 | DEEE74241929B29300200D45 /* CCPushedViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = CCPushedViewController.xib; sourceTree = ""; };
69 | /* End PBXFileReference section */
70 |
71 | /* Begin PBXFrameworksBuildPhase section */
72 | DEEE73C61929B1A400200D45 /* Frameworks */ = {
73 | isa = PBXFrameworksBuildPhase;
74 | buildActionMask = 2147483647;
75 | files = (
76 | DEEE73CF1929B1A400200D45 /* CoreGraphics.framework in Frameworks */,
77 | DEEE73D11929B1A400200D45 /* UIKit.framework in Frameworks */,
78 | DEEE73CD1929B1A400200D45 /* Foundation.framework in Frameworks */,
79 | );
80 | runOnlyForDeploymentPostprocessing = 0;
81 | };
82 | /* End PBXFrameworksBuildPhase section */
83 |
84 | /* Begin PBXGroup section */
85 | DE919B681935DDD0001C7616 /* Source */ = {
86 | isa = PBXGroup;
87 | children = (
88 | DE919B691935DDD0001C7616 /* AnimationControllers */,
89 | DE919B741935DDD0001C7616 /* CCNavigationController.h */,
90 | DE919B751935DDD0001C7616 /* CCNavigationController.m */,
91 | DE919B761935DDD0001C7616 /* CCViewController.h */,
92 | DE919B771935DDD0001C7616 /* CCViewController.m */,
93 | );
94 | name = Source;
95 | path = ../../Source;
96 | sourceTree = "";
97 | };
98 | DE919B691935DDD0001C7616 /* AnimationControllers */ = {
99 | isa = PBXGroup;
100 | children = (
101 | DE919B6A1935DDD0001C7616 /* CCBaseAnimation.h */,
102 | DE919B6B1935DDD0001C7616 /* CCBaseAnimation.m */,
103 | DE919B6C1935DDD0001C7616 /* CCFlipAnimation.h */,
104 | DE919B6D1935DDD0001C7616 /* CCFlipAnimation.m */,
105 | DE919B6E1935DDD0001C7616 /* CCLayerAnimation.h */,
106 | DE919B6F1935DDD0001C7616 /* CCLayerAnimation.m */,
107 | DE919B701935DDD0001C7616 /* CCScaleAnimation.h */,
108 | DE919B711935DDD0001C7616 /* CCScaleAnimation.m */,
109 | DE919B721935DDD0001C7616 /* CCSlideAnimation.h */,
110 | DE919B731935DDD0001C7616 /* CCSlideAnimation.m */,
111 | );
112 | path = AnimationControllers;
113 | sourceTree = "";
114 | };
115 | DEEE73C01929B1A400200D45 = {
116 | isa = PBXGroup;
117 | children = (
118 | DEEE73D21929B1A400200D45 /* CCTransitionDemo */,
119 | DEEE73CB1929B1A400200D45 /* Frameworks */,
120 | DEEE73CA1929B1A400200D45 /* Products */,
121 | );
122 | sourceTree = "";
123 | };
124 | DEEE73CA1929B1A400200D45 /* Products */ = {
125 | isa = PBXGroup;
126 | children = (
127 | DEEE73C91929B1A400200D45 /* CCTransitionDemo.app */,
128 | );
129 | name = Products;
130 | sourceTree = "";
131 | };
132 | DEEE73CB1929B1A400200D45 /* Frameworks */ = {
133 | isa = PBXGroup;
134 | children = (
135 | DEEE73CC1929B1A400200D45 /* Foundation.framework */,
136 | DEEE73CE1929B1A400200D45 /* CoreGraphics.framework */,
137 | DEEE73D01929B1A400200D45 /* UIKit.framework */,
138 | DEEE73E51929B1A400200D45 /* XCTest.framework */,
139 | );
140 | name = Frameworks;
141 | sourceTree = "";
142 | };
143 | DEEE73D21929B1A400200D45 /* CCTransitionDemo */ = {
144 | isa = PBXGroup;
145 | children = (
146 | DEEE73DB1929B1A400200D45 /* AppDelegate.h */,
147 | DEEE73DC1929B1A400200D45 /* AppDelegate.m */,
148 | DEEE741C1929B29300200D45 /* CCMainViewController.h */,
149 | DEEE741D1929B29300200D45 /* CCMainViewController.m */,
150 | DEEE741E1929B29300200D45 /* CCMainViewController.xib */,
151 | DEEE741F1929B29300200D45 /* CCModalViewController.h */,
152 | DEEE74201929B29300200D45 /* CCModalViewController.m */,
153 | DEEE74211929B29300200D45 /* CCModalViewController.xib */,
154 | DEEE74221929B29300200D45 /* CCPushedViewController.h */,
155 | DEEE74231929B29300200D45 /* CCPushedViewController.m */,
156 | DEEE74241929B29300200D45 /* CCPushedViewController.xib */,
157 | DE919B681935DDD0001C7616 /* Source */,
158 | 09DE33B81D35D9E700AA6F3C /* Images.xcassets */,
159 | DEEE73D31929B1A400200D45 /* Supporting Files */,
160 | );
161 | path = CCTransitionDemo;
162 | sourceTree = "";
163 | };
164 | DEEE73D31929B1A400200D45 /* Supporting Files */ = {
165 | isa = PBXGroup;
166 | children = (
167 | 09DE33B61D35D9BE00AA6F3C /* LaunchScreen.storyboard */,
168 | DEEE741A1929B28000200D45 /* 130930-IPHONE5-IOS7-D.jpg */,
169 | DEEE73D41929B1A400200D45 /* Info.plist */,
170 | DEEE73D81929B1A400200D45 /* main.m */,
171 | );
172 | name = "Supporting Files";
173 | sourceTree = "";
174 | };
175 | /* End PBXGroup section */
176 |
177 | /* Begin PBXNativeTarget section */
178 | DEEE73C81929B1A400200D45 /* CCTransitionDemo */ = {
179 | isa = PBXNativeTarget;
180 | buildConfigurationList = DEEE73F51929B1A400200D45 /* Build configuration list for PBXNativeTarget "CCTransitionDemo" */;
181 | buildPhases = (
182 | DEEE73C51929B1A400200D45 /* Sources */,
183 | DEEE73C61929B1A400200D45 /* Frameworks */,
184 | DEEE73C71929B1A400200D45 /* Resources */,
185 | );
186 | buildRules = (
187 | );
188 | dependencies = (
189 | );
190 | name = CCTransitionDemo;
191 | productName = CCTransitionAnimationDemo;
192 | productReference = DEEE73C91929B1A400200D45 /* CCTransitionDemo.app */;
193 | productType = "com.apple.product-type.application";
194 | };
195 | /* End PBXNativeTarget section */
196 |
197 | /* Begin PBXProject section */
198 | DEEE73C11929B1A400200D45 /* Project object */ = {
199 | isa = PBXProject;
200 | attributes = {
201 | CLASSPREFIX = CC;
202 | LastUpgradeCheck = 0730;
203 | ORGANIZATIONNAME = ichigo;
204 | };
205 | buildConfigurationList = DEEE73C41929B1A400200D45 /* Build configuration list for PBXProject "CCTransitionDemo" */;
206 | compatibilityVersion = "Xcode 3.2";
207 | developmentRegion = English;
208 | hasScannedForEncodings = 0;
209 | knownRegions = (
210 | en,
211 | );
212 | mainGroup = DEEE73C01929B1A400200D45;
213 | productRefGroup = DEEE73CA1929B1A400200D45 /* Products */;
214 | projectDirPath = "";
215 | projectRoot = "";
216 | targets = (
217 | DEEE73C81929B1A400200D45 /* CCTransitionDemo */,
218 | );
219 | };
220 | /* End PBXProject section */
221 |
222 | /* Begin PBXResourcesBuildPhase section */
223 | DEEE73C71929B1A400200D45 /* Resources */ = {
224 | isa = PBXResourcesBuildPhase;
225 | buildActionMask = 2147483647;
226 | files = (
227 | DEEE74261929B29300200D45 /* CCMainViewController.xib in Resources */,
228 | DEEE742A1929B29300200D45 /* CCPushedViewController.xib in Resources */,
229 | DEEE741B1929B28000200D45 /* 130930-IPHONE5-IOS7-D.jpg in Resources */,
230 | 09DE33B91D35D9E700AA6F3C /* Images.xcassets in Resources */,
231 | 09DE33B71D35D9BE00AA6F3C /* LaunchScreen.storyboard in Resources */,
232 | DEEE74281929B29300200D45 /* CCModalViewController.xib in Resources */,
233 | );
234 | runOnlyForDeploymentPostprocessing = 0;
235 | };
236 | /* End PBXResourcesBuildPhase section */
237 |
238 | /* Begin PBXSourcesBuildPhase section */
239 | DEEE73C51929B1A400200D45 /* Sources */ = {
240 | isa = PBXSourcesBuildPhase;
241 | buildActionMask = 2147483647;
242 | files = (
243 | DE919B7D1935DDD0001C7616 /* CCNavigationController.m in Sources */,
244 | DEEE73DD1929B1A400200D45 /* AppDelegate.m in Sources */,
245 | DEEE74251929B29300200D45 /* CCMainViewController.m in Sources */,
246 | DE919B7C1935DDD0001C7616 /* CCSlideAnimation.m in Sources */,
247 | DE919B791935DDD0001C7616 /* CCFlipAnimation.m in Sources */,
248 | DE919B7B1935DDD0001C7616 /* CCScaleAnimation.m in Sources */,
249 | DEEE73D91929B1A400200D45 /* main.m in Sources */,
250 | DEEE74271929B29300200D45 /* CCModalViewController.m in Sources */,
251 | DE919B7E1935DDD0001C7616 /* CCViewController.m in Sources */,
252 | DEEE74291929B29300200D45 /* CCPushedViewController.m in Sources */,
253 | DE919B7A1935DDD0001C7616 /* CCLayerAnimation.m in Sources */,
254 | DE919B781935DDD0001C7616 /* CCBaseAnimation.m in Sources */,
255 | );
256 | runOnlyForDeploymentPostprocessing = 0;
257 | };
258 | /* End PBXSourcesBuildPhase section */
259 |
260 | /* Begin XCBuildConfiguration section */
261 | DEEE73F31929B1A400200D45 /* Debug */ = {
262 | isa = XCBuildConfiguration;
263 | buildSettings = {
264 | ALWAYS_SEARCH_USER_PATHS = NO;
265 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
266 | CLANG_CXX_LIBRARY = "libc++";
267 | CLANG_ENABLE_MODULES = YES;
268 | CLANG_ENABLE_OBJC_ARC = YES;
269 | CLANG_WARN_BOOL_CONVERSION = YES;
270 | CLANG_WARN_CONSTANT_CONVERSION = YES;
271 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
272 | CLANG_WARN_EMPTY_BODY = YES;
273 | CLANG_WARN_ENUM_CONVERSION = YES;
274 | CLANG_WARN_INT_CONVERSION = YES;
275 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
276 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
277 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
278 | COPY_PHASE_STRIP = NO;
279 | ENABLE_TESTABILITY = YES;
280 | GCC_C_LANGUAGE_STANDARD = gnu99;
281 | GCC_DYNAMIC_NO_PIC = NO;
282 | GCC_OPTIMIZATION_LEVEL = 0;
283 | GCC_PREPROCESSOR_DEFINITIONS = (
284 | "DEBUG=1",
285 | "$(inherited)",
286 | );
287 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
288 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
289 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
290 | GCC_WARN_UNDECLARED_SELECTOR = YES;
291 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
292 | GCC_WARN_UNUSED_FUNCTION = YES;
293 | GCC_WARN_UNUSED_VARIABLE = YES;
294 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
295 | ONLY_ACTIVE_ARCH = YES;
296 | SDKROOT = iphoneos;
297 | TARGETED_DEVICE_FAMILY = "1,2";
298 | };
299 | name = Debug;
300 | };
301 | DEEE73F41929B1A400200D45 /* Release */ = {
302 | isa = XCBuildConfiguration;
303 | buildSettings = {
304 | ALWAYS_SEARCH_USER_PATHS = NO;
305 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
306 | CLANG_CXX_LIBRARY = "libc++";
307 | CLANG_ENABLE_MODULES = YES;
308 | CLANG_ENABLE_OBJC_ARC = YES;
309 | CLANG_WARN_BOOL_CONVERSION = YES;
310 | CLANG_WARN_CONSTANT_CONVERSION = YES;
311 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
312 | CLANG_WARN_EMPTY_BODY = YES;
313 | CLANG_WARN_ENUM_CONVERSION = YES;
314 | CLANG_WARN_INT_CONVERSION = YES;
315 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
316 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
317 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
318 | COPY_PHASE_STRIP = YES;
319 | ENABLE_NS_ASSERTIONS = NO;
320 | GCC_C_LANGUAGE_STANDARD = gnu99;
321 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
322 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
323 | GCC_WARN_UNDECLARED_SELECTOR = YES;
324 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
325 | GCC_WARN_UNUSED_FUNCTION = YES;
326 | GCC_WARN_UNUSED_VARIABLE = YES;
327 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
328 | SDKROOT = iphoneos;
329 | TARGETED_DEVICE_FAMILY = "1,2";
330 | VALIDATE_PRODUCT = YES;
331 | };
332 | name = Release;
333 | };
334 | DEEE73F61929B1A400200D45 /* Debug */ = {
335 | isa = XCBuildConfiguration;
336 | buildSettings = {
337 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
338 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
339 | GCC_PREFIX_HEADER = "$(PRODUCT_NAME)/Prefix.pch";
340 | INFOPLIST_FILE = "$(SRCROOT)/CCTransitionDemo/Info.plist";
341 | PRODUCT_BUNDLE_IDENTIFIER = com.xiongcaichang.;
342 | PRODUCT_NAME = CCTransitionDemo;
343 | WRAPPER_EXTENSION = app;
344 | };
345 | name = Debug;
346 | };
347 | DEEE73F71929B1A400200D45 /* Release */ = {
348 | isa = XCBuildConfiguration;
349 | buildSettings = {
350 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
351 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
352 | GCC_PREFIX_HEADER = "$(PRODUCT_NAME)/Prefix.pch";
353 | INFOPLIST_FILE = "$(SRCROOT)/CCTransitionDemo/Info.plist";
354 | PRODUCT_BUNDLE_IDENTIFIER = com.xiongcaichang.;
355 | PRODUCT_NAME = CCTransitionDemo;
356 | WRAPPER_EXTENSION = app;
357 | };
358 | name = Release;
359 | };
360 | /* End XCBuildConfiguration section */
361 |
362 | /* Begin XCConfigurationList section */
363 | DEEE73C41929B1A400200D45 /* Build configuration list for PBXProject "CCTransitionDemo" */ = {
364 | isa = XCConfigurationList;
365 | buildConfigurations = (
366 | DEEE73F31929B1A400200D45 /* Debug */,
367 | DEEE73F41929B1A400200D45 /* Release */,
368 | );
369 | defaultConfigurationIsVisible = 0;
370 | defaultConfigurationName = Release;
371 | };
372 | DEEE73F51929B1A400200D45 /* Build configuration list for PBXNativeTarget "CCTransitionDemo" */ = {
373 | isa = XCConfigurationList;
374 | buildConfigurations = (
375 | DEEE73F61929B1A400200D45 /* Debug */,
376 | DEEE73F71929B1A400200D45 /* Release */,
377 | );
378 | defaultConfigurationIsVisible = 0;
379 | defaultConfigurationName = Release;
380 | };
381 | /* End XCConfigurationList section */
382 | };
383 | rootObject = DEEE73C11929B1A400200D45 /* Project object */;
384 | }
385 |
--------------------------------------------------------------------------------