Latest 1.0.0
License MIT
Platforms ios 6.1, requires ARC
Frameworks UIKit

CCTransition 快速自定义转场动画

Build Status
Pod Version
Pod Platform
Pod License
Dependency Status



(开始)Getting started

  • 使用 cocopods ( Using CocoaPods)

    pod 'CCTransition', '~> 1.0.0'
  • 常规使用 (Using narmal)

    将 CCTransition 文件夹拖入项目

Basic usage

  1. 自定义导航控制器转场

    创建一个 CCNavigationController 实例

     CCNavigationController *navigationController = [[CCNavigationController alloc] initWithRootViewController:viewController];
     CCLayerAnimation *layerAnimation = [[CCLayerAnimation alloc] initWithType:CCLayerAnimationCover];
     navigationController.animationController = layerAnimation;

    如果你是用 storyBord, 请确保你的控制器被 CCNavigationController管理

    • 使用方法, 你可以在 viewDidLoad 添加以下代码
    CCNavigationController *fancyNavigationController = (CCNavigationController *)self.navigationController;
    CCLayerAnimation *layerAnimation = [[CCLayerAnimation alloc] initWithType:CCLayerAnimationCover];
    fancyNavigationController.animationController = layerAnimation;
  2. 自定义 Modal 转场

    确保你用来 modal 的控制器是 CCViewController 的子类

    CCMainViewController *mainController = [[CCMainViewController alloc] initWithNibName:@"CCFirstViewController" bundle:nil];
    CCSlideAnimation *slideAnimation = [[CCSlideAnimation alloc] init];
    slideAnimation.type = CCSlideAnimationFromTop;
    mainController.animationController = slideAnimation;
    CCModalViewController *modalController = [[CCModalViewController alloc] initWithNibName:@"CCModalViewController" bundle:nil];
    modalController.transitioningDelegate = mainController.transitioningDelegate; // this is important for the transition to work
    [modalController.navigationController presentViewController:viewController animated:YES completion:nil];
  3. 交互

    navigationController.interactionEnabled = YES;
    // 模态奇偶奥胡
    mainViewController.interactionEnabled = YES;

Latest podspec

    "name": "CCTransition",
    "version": "1.0.0",
    "summary": "Library to customize transition animation in iOS 7",
    "description": "CCTransition provides a convenient method to present view controllers with custom animation and interaction.nYou can also easily create your own transition animations and apply them to your view controllers to make your app stand out.",
    "screenshots": "",
    "homepage": "",
    "social_media_url": "",
    "license": "MIT",
    "authors": "xiongcaichang",
    "platforms": {
        "ios": "6.1"
    "source": {
        "git": "",
        "tag": "1.0.0"
    "source_files": "Source/**/*.{h,m}",
    "frameworks": "UIKit",
    "requires_arc": true

Pin It on Pinterest

Share This