Showing preview only (224K chars total). Download the full file or copy to clipboard to get everything.
Repository: ColinEberhardt/VCTransitionsLibrary
Branch: master
Commit: 4ce0512ffac8
Files: 73
Total size: 204.1 KB
Directory structure:
gitextract_s4rkdg0k/
├── .gitignore
├── AnimationControllers/
│ ├── CECardsAnimationController.h
│ ├── CECardsAnimationController.m
│ ├── CECrossfadeAnimationController.h
│ ├── CECrossfadeAnimationController.m
│ ├── CECubeAnimationController.h
│ ├── CECubeAnimationController.m
│ ├── CEExplodeAnimationController.h
│ ├── CEExplodeAnimationController.m
│ ├── CEFlipAnimationController.h
│ ├── CEFlipAnimationController.m
│ ├── CEFoldAnimationController.h
│ ├── CEFoldAnimationController.m
│ ├── CENatGeoAnimationController.h
│ ├── CENatGeoAnimationController.m
│ ├── CEPanAnimationController.h
│ ├── CEPanAnimationController.m
│ ├── CEPortalAnimationController.h
│ ├── CEPortalAnimationController.m
│ ├── CEReversibleAnimationController.h
│ ├── CEReversibleAnimationController.m
│ ├── CETurnAnimationController.h
│ └── CETurnAnimationController.m
├── CHANGELOG.md
├── InteractionControllers/
│ ├── CEBaseInteractionController.h
│ ├── CEBaseInteractionController.m
│ ├── CEHorizontalSwipeInteractionController.h
│ ├── CEHorizontalSwipeInteractionController.m
│ ├── CEPinchInteractionController.h
│ ├── CEPinchInteractionController.m
│ ├── CEVerticalSwipeInteractionController.h
│ └── CEVerticalSwipeInteractionController.m
├── MIT-LICENSE.txt
├── README.md
├── TabBarDemo/
│ ├── TabBarDemo/
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Base.lproj/
│ │ │ ├── Main_iPad.storyboard
│ │ │ └── Main_iPhone.storyboard
│ │ ├── Images.xcassets/
│ │ │ ├── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ └── LaunchImage.launchimage/
│ │ │ └── Contents.json
│ │ ├── TabBarDemo-Info.plist
│ │ ├── TabBarDemo-Prefix.pch
│ │ ├── TabBarViewController.h
│ │ ├── TabBarViewController.m
│ │ ├── ViewController.h
│ │ ├── ViewController.m
│ │ ├── en.lproj/
│ │ │ └── InfoPlist.strings
│ │ └── main.m
│ ├── TabBarDemo.xcodeproj/
│ │ ├── project.pbxproj
│ │ └── project.xcworkspace/
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata/
│ │ └── TabBarDemo.xccheckout
│ └── TabBarDemoTests/
│ ├── TabBarDemoTests-Info.plist
│ ├── TabBarDemoTests.m
│ └── en.lproj/
│ └── InfoPlist.strings
├── TransitionsDemo/
│ ├── TransitionsDemo/
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── Base.lproj/
│ │ │ ├── Launch Screen.storyboard
│ │ │ └── Main_iPhone.storyboard
│ │ ├── Images.xcassets/
│ │ │ ├── AppIcon.appiconset/
│ │ │ │ └── Contents.json
│ │ │ └── LaunchImage.launchimage/
│ │ │ └── Contents.json
│ │ ├── NavigationController.h
│ │ ├── NavigationController.m
│ │ ├── SettingsViewController.h
│ │ ├── SettingsViewController.m
│ │ ├── TransitionsDemo-Info.plist
│ │ ├── TransitionsDemo-Prefix.pch
│ │ ├── ViewController.h
│ │ ├── ViewController.m
│ │ ├── en.lproj/
│ │ │ └── InfoPlist.strings
│ │ └── main.m
│ └── TransitionsDemo.xcodeproj/
│ ├── project.pbxproj
│ └── project.xcworkspace/
│ └── contents.xcworkspacedata
└── VCTransitionsLibrary.podspec
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
#########################
# .gitignore file for Xcode4 / OS X Source projects
#
# Version 2.0
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2013 updates:
# - fixed the broken "save personal Schemes"
#
# NB: if you are storing "built" products, this WILL NOT WORK,
# and you should use a different .gitignore (or none at all)
# This file is for SOURCE projects, where there are many extra
# files that we want to exclude
#
#########################
#####
# OS X temporary files that should never be committed
.DS_Store
*.swp
*.lock
profile
####
# Xcode temporary files that should never be committed
#
# NB: NIB/XIB files still exist even on Storyboard projects, so we want this...
*~.nib
####
# Xcode build files -
#
# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "DerivedData"
DerivedData/
# NB: slash on the end, so we only remove the FOLDER, not any files that were badly named "build"
build/
#####
# Xcode private settings (window sizes, bookmarks, breakpoints, custom executables, smart groups)
#
# This is complicated:
#
# SOMETIMES you need to put this file in version control.
# Apple designed it poorly - if you use "custom executables", they are
# saved in this file.
# 99% of projects do NOT use those, so they do NOT want to version control this file.
# ..but if you're in the 1%, comment out the line "*.pbxuser"
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
# NB: also, whitelist the default ones, some projects need to use these
!default.pbxuser
!default.mode1v3
!default.mode2v3
!default.perspectivev3
####
# Xcode 4 - semi-personal settings
#
#
# OPTION 1: ---------------------------------
# throw away ALL personal settings (including custom schemes!
# - unless they are "shared")
#
# NB: this is exclusive with OPTION 2 below
xcuserdata
# OPTION 2: ---------------------------------
# get rid of ALL personal settings, but KEEP SOME OF THEM
# - NB: you must manually uncomment the bits you want to keep
#
# NB: this is exclusive with OPTION 1 above
#
#xcuserdata/**/*
# (requires option 2 above): Personal Schemes
#
#!xcuserdata/**/xcschemes/*
####
# XCode 4 workspaces - more detailed
#
# Workspaces are important! They are a core feature of Xcode - don't exclude them :)
#
# Workspace layout is quite spammy. For reference:
#
# /(root)/
# /(project-name).xcodeproj/
# project.pbxproj
# /project.xcworkspace/
# contents.xcworkspacedata
# /xcuserdata/
# /(your name)/xcuserdatad/
# UserInterfaceState.xcuserstate
# /xcsshareddata/
# /xcschemes/
# (shared scheme name).xcscheme
# /xcuserdata/
# /(your name)/xcuserdatad/
# (private scheme).xcscheme
# xcschememanagement.plist
#
#
####
# Xcode 4 - Deprecated classes
#
# Allegedly, if you manually "deprecate" your classes, they get moved here.
#
# We're using source-control, so this is a "feature" that we do not want!
*.moved-aside
####
# Cocoapods: cocoapods.org
#
# Ignoring these files means that whoever uses the code will first have to run:
# pod install
# in the App.xcodeproj directory.
# This ensures the latest dependencies are used.
Pods/
Podfile.lock
####
# UNKNOWN: recommended by others, but I can't discover what these files are
#
# ...none. Everything is now explained.
TransitionsDemo.xccheckout
================================================
FILE: AnimationControllers/CECardsAnimationController.h
================================================
//
// CEZoomAnimationController.h
// TransitionsDemo
//
// Created by Colin Eberhardt on 22/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CEReversibleAnimationController.h"
@interface CECardsAnimationController : CEReversibleAnimationController
@end
================================================
FILE: AnimationControllers/CECardsAnimationController.m
================================================
//
// CEZoomAnimationController.m
// TransitionsDemo
//
// Created by Colin Eberhardt on 22/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CECardsAnimationController.h"
@implementation CECardsAnimationController
- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext fromVC:(UIViewController *)fromVC toVC:(UIViewController *)toVC fromView:(UIView *)fromView toView:(UIView *)toView {
if(self.reverse){
[self executeReverseAnimation:transitionContext fromVC:fromVC toVC:toVC fromView:fromView toView:toView];
} else {
[self executeForwardsAnimation:transitionContext fromVC:fromVC toVC:toVC fromView:fromView toView:toView];
}
}
-(void)executeForwardsAnimation:(id<UIViewControllerContextTransitioning>)transitionContext fromVC:(UIViewController *)fromVC toVC:(UIViewController *)toVC fromView:(UIView *)fromView toView:(UIView *)toView {
UIView* containerView = [transitionContext containerView];
// positions the to- view off the bottom of the sceen
CGRect frame = [transitionContext initialFrameForViewController:fromVC];
CGRect offScreenFrame = frame;
offScreenFrame.origin.y = offScreenFrame.size.height;
toView.frame = offScreenFrame;
[containerView insertSubview:toView aboveSubview:fromView];
CATransform3D t1 = [self firstTransform];
CATransform3D t2 = [self secondTransformWithView:fromView];
[UIView animateKeyframesWithDuration:self.duration delay:0.0 options:UIViewKeyframeAnimationOptionCalculationModeCubic animations:^{
// push the from- view to the back
[UIView addKeyframeWithRelativeStartTime:0.0f relativeDuration:0.4f animations:^{
fromView.layer.transform = t1;
fromView.alpha = 0.6;
}];
[UIView addKeyframeWithRelativeStartTime:0.2f relativeDuration:0.4f animations:^{
fromView.layer.transform = t2;
}];
// slide the to- view upwards. In his original implementation Tope used a 'spring' animation, however
// this does not work with keyframes, so we siulate it by overshooting the final location in
// the first keyframe
[UIView addKeyframeWithRelativeStartTime:0.6f relativeDuration:0.2f animations:^{
toView.frame = CGRectOffset(toView.frame, 0.0, -30.0);
}];
[UIView addKeyframeWithRelativeStartTime:0.8f relativeDuration:0.2f animations:^{
toView.frame = frame;
}];
} completion:^(BOOL finished) {
[transitionContext completeTransition:![transitionContext transitionWasCancelled]];
}];
}
-(void)executeReverseAnimation:(id<UIViewControllerContextTransitioning>)transitionContext fromVC:(UIViewController *)fromVC toVC:(UIViewController *)toVC fromView:(UIView *)fromView toView:(UIView *)toView {
UIView* containerView = [transitionContext containerView];
// positions the to- view behind the from- view
CGRect frame = [transitionContext initialFrameForViewController:fromVC];
toView.frame = frame;
CATransform3D scale = CATransform3DIdentity;
toView.layer.transform = CATransform3DScale(scale, 0.6, 0.6, 1);
toView.alpha = 0.6;
[containerView insertSubview:toView belowSubview:fromView];
CGRect frameOffScreen = frame;
frameOffScreen.origin.y = frame.size.height;
CATransform3D t1 = [self firstTransform];
[UIView animateKeyframesWithDuration:self.duration delay:0 options:UIViewKeyframeAnimationOptionCalculationModeCubic animations:^{
// push the from- view off the bottom of the screen
[UIView addKeyframeWithRelativeStartTime:0.0f relativeDuration:0.5f animations:^{
fromView.frame = frameOffScreen;
}];
// animate the to- view into place
[UIView addKeyframeWithRelativeStartTime:0.35f relativeDuration:0.35f animations:^{
toView.layer.transform = t1;
toView.alpha = 1.0;
}];
[UIView addKeyframeWithRelativeStartTime:0.75f relativeDuration:0.25f animations:^{
toView.layer.transform = CATransform3DIdentity;
}];
} completion:^(BOOL finished) {
if ([transitionContext transitionWasCancelled]) {
toView.layer.transform = CATransform3DIdentity;
toView.alpha = 1.0;
}
[transitionContext completeTransition:![transitionContext transitionWasCancelled]];
}];
}
-(CATransform3D)firstTransform{
CATransform3D t1 = CATransform3DIdentity;
t1.m34 = 1.0/-900;
t1 = CATransform3DScale(t1, 0.95, 0.95, 1);
t1 = CATransform3DRotate(t1, 15.0f * M_PI/180.0f, 1, 0, 0);
return t1;
}
-(CATransform3D)secondTransformWithView:(UIView*)view{
CATransform3D t2 = CATransform3DIdentity;
t2.m34 = [self firstTransform].m34;
t2 = CATransform3DTranslate(t2, 0, view.frame.size.height*-0.08, 0);
t2 = CATransform3DScale(t2, 0.8, 0.8, 1);
return t2;
}
@end
================================================
FILE: AnimationControllers/CECrossfadeAnimationController.h
================================================
//
// CECrossfadeAnimationController.h
// TransitionsDemo
//
// Created by Colin Eberhardt on 11/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CEReversibleAnimationController.h"
/**
Animates between the two view controllers by performing a simple cross-fade.
*/
@interface CECrossfadeAnimationController : CEReversibleAnimationController
@end
================================================
FILE: AnimationControllers/CECrossfadeAnimationController.m
================================================
//
// CECrossfadeAnimationController.m
// TransitionsDemo
//
// Created by Colin Eberhardt on 11/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CECrossfadeAnimationController.h"
@implementation CECrossfadeAnimationController
- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext fromVC:(UIViewController *)fromVC toVC:(UIViewController *)toVC fromView:(UIView *)fromView toView:(UIView *)toView {
// Add the toView to the container
UIView* containerView = [transitionContext containerView];
toView.frame = [transitionContext finalFrameForViewController:toVC];
[containerView addSubview:toView];
[containerView sendSubviewToBack:toView];
// animate
NSTimeInterval duration = [self transitionDuration:transitionContext];
[UIView animateWithDuration:duration animations:^{
fromView.alpha = 0.0;
} completion:^(BOOL finished) {
if ([transitionContext transitionWasCancelled]) {
fromView.alpha = 1.0;
} else {
// reset from- view to its original state
[fromView removeFromSuperview];
fromView.alpha = 1.0;
}
[transitionContext completeTransition:![transitionContext transitionWasCancelled]];
}];
}
@end
================================================
FILE: AnimationControllers/CECubeAnimationController.h
================================================
//
// CubeNavigationAnimator.h
// MovieQuiz
//
// Created by Andrés Brun on 27/10/13.
// Copyright (c) 2013 Andrés Brun. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CEReversibleAnimationController.h"
typedef enum {CubeAnimationWayHorizontal, CubeAnimationWayVertical} CubeAnimationWay;
typedef enum {CubeAnimationTypeInverse, CubeAnimationTypeNormal} CubeAnimationType;
@interface CECubeAnimationController : CEReversibleAnimationController
@property (nonatomic, assign) CubeAnimationWay cubeAnimationWay;
@property (nonatomic, assign) CubeAnimationType cubeAnimationType;
@end
================================================
FILE: AnimationControllers/CECubeAnimationController.m
================================================
//
// CubeNavigationAnimator.m
// MovieQuiz
//
// Created by Andrés Brun on 27/10/13.
// Copyright (c) 2013 Andrés Brun. All rights reserved.
//
#import "CECubeAnimationController.h"
#define PERSPECTIVE -1.0 / 200.0
#define ROTATION_ANGLE M_PI_2
@implementation CECubeAnimationController
- (id)init
{
self = [super init];
if (self) {
self.cubeAnimationWay = CubeAnimationWayHorizontal;
}
return self;
}
- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext fromVC:(UIViewController *)fromVC toVC:(UIViewController *)toVC fromView:(UIView *)fromView toView:(UIView *)toView
{
toView.frame = [transitionContext finalFrameForViewController:toVC];
//Calculate the direction
int dir = self.reverse ? 1 : -1;
//Create the differents 3D animations
CATransform3D viewFromTransform;
CATransform3D viewToTransform;
//We create a content view for do the translate animation
UIView *generalContentView = [transitionContext containerView];
switch (self.cubeAnimationWay) {
case CubeAnimationWayHorizontal:
viewFromTransform = CATransform3DMakeRotation(dir*ROTATION_ANGLE, 0.0, 1.0, 0.0);
viewToTransform = CATransform3DMakeRotation(-dir*ROTATION_ANGLE, 0.0, 1.0, 0.0);
[toView.layer setAnchorPoint:CGPointMake(dir==1?0:1, 0.5)];
[fromView.layer setAnchorPoint:CGPointMake(dir==1?1:0, 0.5)];
[generalContentView setTransform:CGAffineTransformMakeTranslation(dir*(generalContentView.frame.size.width)/2.0, 0)];
break;
case CubeAnimationWayVertical:
viewFromTransform = CATransform3DMakeRotation(-dir*ROTATION_ANGLE, 1.0, 0.0, 0.0);
viewToTransform = CATransform3DMakeRotation(dir*ROTATION_ANGLE, 1.0, 0.0, 0.0);
[toView.layer setAnchorPoint:CGPointMake(0.5, dir==1?0:1)];
[fromView.layer setAnchorPoint:CGPointMake(0.5, dir==1?1:0)];
[generalContentView setTransform:CGAffineTransformMakeTranslation(0, dir*(generalContentView.frame.size.height)/2.0)];
break;
default:
break;
}
viewFromTransform.m34 = PERSPECTIVE;
viewToTransform.m34 = PERSPECTIVE;
toView.layer.transform = viewToTransform;
//Create the shadow
UIView *fromShadow = [self addOpacityToView:fromView withColor:[UIColor blackColor]];
UIView *toShadow = [self addOpacityToView:toView withColor:[UIColor blackColor]];
[fromShadow setAlpha:0.0];
[toShadow setAlpha:1.0];
//Add the to- view
[generalContentView addSubview:toView];
[UIView animateWithDuration:[self transitionDuration:transitionContext] animations:^{
switch (self.cubeAnimationWay) {
case CubeAnimationWayHorizontal:
[generalContentView setTransform:CGAffineTransformMakeTranslation(-dir*generalContentView.frame.size.width/2.0, 0)];
break;
case CubeAnimationWayVertical:
[generalContentView setTransform:CGAffineTransformMakeTranslation(0, -dir*(generalContentView.frame.size.height)/2.0)];
break;
default:
break;
}
fromView.layer.transform = viewFromTransform;
toView.layer.transform = CATransform3DIdentity;
[fromShadow setAlpha:1.0];
[toShadow setAlpha:0.0];
} completion:^(BOOL finished) {
//Set the final position of every elements transformed
[generalContentView setTransform:CGAffineTransformIdentity];
fromView.layer.transform = CATransform3DIdentity;
toView.layer.transform = CATransform3DIdentity;
[fromView.layer setAnchorPoint:CGPointMake(0.5f, 0.5f)];
[toView.layer setAnchorPoint:CGPointMake(0.5f, 0.5f)];
[fromShadow removeFromSuperview];
[toShadow removeFromSuperview];
if ([transitionContext transitionWasCancelled]) {
[toView removeFromSuperview];
} else {
[fromView removeFromSuperview];
}
// inform the context of completion
[transitionContext completeTransition:![transitionContext transitionWasCancelled]];
}];
}
- (UIView *)addOpacityToView:(UIView *) view withColor:(UIColor *)theColor
{
UIView *shadowView = [[UIView alloc] initWithFrame:view.bounds];
[shadowView setBackgroundColor:[theColor colorWithAlphaComponent:0.8]];
[view addSubview:shadowView];
return shadowView;
}
@end
================================================
FILE: AnimationControllers/CEExplodeAnimationController.h
================================================
//
// CEExplodeAnimationController.h
// TransitionsDemo
//
// Created by Colin Eberhardt on 11/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CEReversibleAnimationController.h"
/**
Animates between the two view controllers by slicing the from- view controller into lots of little pieces, then randomly spinning and shrinking them.
*/
@interface CEExplodeAnimationController : CEReversibleAnimationController
@end
================================================
FILE: AnimationControllers/CEExplodeAnimationController.m
================================================
//
// CEExplodeAnimationController.m
// TransitionsDemo
//
// Created by Colin Eberhardt on 11/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CEExplodeAnimationController.h"
@implementation CEExplodeAnimationController
- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext fromVC:(UIViewController *)fromVC toVC:(UIViewController *)toVC fromView:(UIView *)fromView toView:(UIView *)toView {
// Add the toView to the container
UIView* containerView = [transitionContext containerView];
[containerView addSubview:toView];
[containerView sendSubviewToBack:toView];
CGSize size = toView.frame.size;
NSMutableArray *snapshots = [NSMutableArray new];
CGFloat xFactor = 10.0f;
CGFloat yFactor = xFactor * size.height / size.width;
// snapshot the from view, this makes subsequent snaphots more performant
UIView *fromViewSnapshot = [fromView snapshotViewAfterScreenUpdates:NO];
// create a snapshot for each of the exploding pieces
for (CGFloat x=0; x < size.width; x+= size.width / xFactor) {
for (CGFloat y=0; y < size.height; y+= size.height / yFactor) {
CGRect snapshotRegion = CGRectMake(x, y, size.width / xFactor, size.height / yFactor);
UIView *snapshot = [fromViewSnapshot resizableSnapshotViewFromRect:snapshotRegion afterScreenUpdates:NO withCapInsets:UIEdgeInsetsZero];
snapshot.frame = snapshotRegion;
[containerView addSubview:snapshot];
[snapshots addObject:snapshot];
}
}
[containerView sendSubviewToBack:fromView];
// animate
NSTimeInterval duration = [self transitionDuration:transitionContext];
[UIView animateWithDuration:duration animations:^{
for (UIView *view in snapshots) {
CGFloat xOffset = [self randomFloatBetween:-100.0 and:100.0];
CGFloat yOffset = [self randomFloatBetween:-100.0 and:100.0];
view.frame = CGRectOffset(view.frame, xOffset, yOffset);
view.alpha = 0.0;
view.transform = CGAffineTransformScale(CGAffineTransformMakeRotation([self randomFloatBetween:-10.0 and:10.0]), 0.01, 0.01);
}
} completion:^(BOOL finished) {
for (UIView *view in snapshots) {
[view removeFromSuperview];
}
[transitionContext completeTransition:![transitionContext transitionWasCancelled]];
}];
}
- (float)randomFloatBetween:(float)smallNumber and:(float)bigNumber {
float diff = bigNumber - smallNumber;
return (((float) (arc4random() % ((unsigned)RAND_MAX + 1)) / RAND_MAX) * diff) + smallNumber;
}
@end
================================================
FILE: AnimationControllers/CEFlipAnimationController.h
================================================
//
// CEFlipAnimationController.h
// ViewControllerTransitions
//
// Created by Colin Eberhardt on 09/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CEReversibleAnimationController.h"
/**
Animates between the two view controllers using a page-flip transition.
*/
@interface CEFlipAnimationController : CEReversibleAnimationController
@end
================================================
FILE: AnimationControllers/CEFlipAnimationController.m
================================================
//
// CEFlipAnimationController.m
// ViewControllerTransitions
//
// Created by Colin Eberhardt on 09/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CEFlipAnimationController.h"
@implementation CEFlipAnimationController
- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext fromVC:(UIViewController *)fromVC toVC:(UIViewController *)toVC fromView:(UIView *)fromView toView:(UIView *)toView {
// Add the toView to the container
UIView* containerView = [transitionContext containerView];
[containerView addSubview:toView];
[containerView sendSubviewToBack:toView];
// Add a perspective transform
CATransform3D transform = CATransform3DIdentity;
transform.m34 = -0.002;
[containerView.layer setSublayerTransform:transform];
// Give both VCs the same start frame
CGRect initialFrame = [transitionContext initialFrameForViewController:fromVC];
fromView.frame = initialFrame;
toView.frame = initialFrame;
// create two-part snapshots of both the from- and to- views
NSArray* toViewSnapshots = [self createSnapshots:toView afterScreenUpdates:YES];
UIView* flippedSectionOfToView = toViewSnapshots[self.reverse ? 0 : 1];
NSArray* fromViewSnapshots = [self createSnapshots:fromView afterScreenUpdates:NO];
UIView* flippedSectionOfFromView = fromViewSnapshots[self.reverse ? 1 : 0];
// replace the from- and to- views with container views that include gradients
flippedSectionOfFromView = [self addShadowToView:flippedSectionOfFromView reverse:!self.reverse];
UIView* flippedSectionOfFromViewShadow = flippedSectionOfFromView.subviews[1];
flippedSectionOfFromViewShadow.alpha = 0.0;
flippedSectionOfToView = [self addShadowToView:flippedSectionOfToView reverse:self.reverse];
UIView* flippedSectionOfToViewShadow = flippedSectionOfToView.subviews[1];
flippedSectionOfToViewShadow.alpha = 1.0;
// change the anchor point so that the view rotate around the correct edge
[self updateAnchorPointAndOffset:CGPointMake(self.reverse ? 0.0 : 1.0, 0.5) view:flippedSectionOfFromView];
[self updateAnchorPointAndOffset:CGPointMake(self.reverse ? 1.0 : 0.0, 0.5) view:flippedSectionOfToView];
// rotate the to- view by 90 degrees, hiding it
flippedSectionOfToView.layer.transform = [self rotate:self.reverse ? M_PI_2 : -M_PI_2];
// animate
NSTimeInterval duration = [self transitionDuration:transitionContext];
[UIView animateKeyframesWithDuration:duration
delay:0.0
options:0
animations:^{
[UIView addKeyframeWithRelativeStartTime:0.0
relativeDuration:0.5
animations:^{
// rotate the from- view to 90 degrees
flippedSectionOfFromView.layer.transform = [self rotate:self.reverse ? -M_PI_2 : M_PI_2];
flippedSectionOfFromViewShadow.alpha = 1.0;
}];
[UIView addKeyframeWithRelativeStartTime:0.5
relativeDuration:0.5
animations:^{
// rotate the to- view to 0 degrees
flippedSectionOfToView.layer.transform = [self rotate:self.reverse ? 0.001 : -0.001];
flippedSectionOfToViewShadow.alpha = 0.0;
}];
} completion:^(BOOL finished) {
// remove all the temporary views
if ([transitionContext transitionWasCancelled]) {
[self removeOtherViews:fromView];
} else {
[self removeOtherViews:toView];
}
// inform the context of completion
[transitionContext completeTransition:![transitionContext transitionWasCancelled]];
}];
}
// removes all the views other than the given view from the superview
- (void)removeOtherViews:(UIView*)viewToKeep {
UIView* containerView = viewToKeep.superview;
for (UIView* view in containerView.subviews) {
if (view != viewToKeep) {
[view removeFromSuperview];
}
}
}
// adds a gradient to an image by creating a containing UIView with both the given view
// and the gradient as subviews
- (UIView*)addShadowToView:(UIView*)view reverse:(BOOL)reverse {
UIView* containerView = view.superview;
// create a view with the same frame
UIView* viewWithShadow = [[UIView alloc] initWithFrame:view.frame];
// replace the view that we are adding a shadow to
[containerView insertSubview:viewWithShadow aboveSubview:view];
[view removeFromSuperview];
// create a shadow
UIView* shadowView = [[UIView alloc] initWithFrame:viewWithShadow.bounds];
CAGradientLayer *gradient = [CAGradientLayer layer];
gradient.frame = shadowView.bounds;
gradient.colors = @[(id)[UIColor colorWithWhite:0.0 alpha:0.0].CGColor,
(id)[UIColor colorWithWhite:0.0 alpha:0.5].CGColor];
gradient.startPoint = CGPointMake(reverse ? 0.0 : 1.0, 0.0);
gradient.endPoint = CGPointMake(reverse ? 1.0 : 0.0, 0.0);
[shadowView.layer insertSublayer:gradient atIndex:1];
// add the original view into our new view
view.frame = view.bounds;
[viewWithShadow addSubview:view];
// place the shadow on top
[viewWithShadow addSubview:shadowView];
return viewWithShadow;
}
// creates a pair of snapshots from the given view
- (NSArray*)createSnapshots:(UIView*)view afterScreenUpdates:(BOOL) afterUpdates{
UIView* containerView = view.superview;
// snapshot the left-hand side of the view
CGRect snapshotRegion = CGRectMake(0, 0, view.frame.size.width / 2, view.frame.size.height);
UIView *leftHandView = [view resizableSnapshotViewFromRect:snapshotRegion afterScreenUpdates:afterUpdates withCapInsets:UIEdgeInsetsZero];
leftHandView.frame = snapshotRegion;
[containerView addSubview:leftHandView];
// snapshot the right-hand side of the view
snapshotRegion = CGRectMake(view.frame.size.width / 2, 0, view.frame.size.width / 2, view.frame.size.height);
UIView *rightHandView = [view resizableSnapshotViewFromRect:snapshotRegion afterScreenUpdates:afterUpdates withCapInsets:UIEdgeInsetsZero];
rightHandView.frame = snapshotRegion;
[containerView addSubview:rightHandView];
// send the view that was snapshotted to the back
[containerView sendSubviewToBack:view];
return @[leftHandView, rightHandView];
}
// updates the anchor point for the given view, offseting the frame to compensate for the resulting movement
- (void)updateAnchorPointAndOffset:(CGPoint)anchorPoint view:(UIView*)view {
view.layer.anchorPoint = anchorPoint;
float xOffset = anchorPoint.x - 0.5;
view.frame = CGRectOffset(view.frame, xOffset * view.frame.size.width, 0);
}
- (CATransform3D) rotate:(CGFloat) angle {
return CATransform3DMakeRotation(angle, 0.0, 1.0, 0.0);
}
@end
================================================
FILE: AnimationControllers/CEFoldAnimationController.h
================================================
//
// CEAccordionAnimationController.h
// TransitionsDemo
//
// Created by Colin Eberhardt on 12/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CEReversibleAnimationController.h"
/**
Animates between the two view controllers using a paper-fold style transition. You can configure the number of folds via the `folds` property.
*/
@interface CEFoldAnimationController : CEReversibleAnimationController
@property (nonatomic) NSUInteger folds;
@end
================================================
FILE: AnimationControllers/CEFoldAnimationController.m
================================================
//
// CEAccordionAnimationController.m
// TransitionsDemo
//
// Created by Colin Eberhardt on 12/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CEFoldAnimationController.h"
@implementation CEFoldAnimationController
- (id)init {
if (self = [super init]) {
self.folds = 2;
}
return self;
}
- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext fromVC:(UIViewController *)fromVC toVC:(UIViewController *)toVC fromView:(UIView *)fromView toView:(UIView *)toView {
// Add the toView to the container
UIView* containerView = [transitionContext containerView];
// move offscreen
toView.frame = [transitionContext finalFrameForViewController:toVC];
toView.frame = CGRectOffset(toView.frame, toView.frame.size.width, 0);
[containerView addSubview:toView];
// Add a perspective transform
CATransform3D transform = CATransform3DIdentity;
transform.m34 = -0.005;
containerView.layer.sublayerTransform = transform;
CGSize size = toView.frame.size;
float foldWidth = size.width * 0.5 / (float)self.folds ;
// arrays that hold the snapshot views
NSMutableArray* fromViewFolds = [NSMutableArray new];
NSMutableArray* toViewFolds = [NSMutableArray new];
// create the folds for the form- and to- views
for (int i=0 ;i<self.folds; i++){
float offset = (float)i * foldWidth * 2;
// the left and right side of the fold for the from- view, with identity transform and 0.0 alpha
// on the shadow, with each view at its initial position
UIView *leftFromViewFold = [self createSnapshotFromView:fromView afterUpdates:NO location:offset left:YES];
leftFromViewFold.layer.position = CGPointMake(offset, size.height/2);
[fromViewFolds addObject:leftFromViewFold];
[leftFromViewFold.subviews[1] setAlpha:0.0];
UIView *rightFromViewFold = [self createSnapshotFromView:fromView afterUpdates:NO location:offset + foldWidth left:NO];
rightFromViewFold.layer.position = CGPointMake(offset + foldWidth * 2, size.height/2);
[fromViewFolds addObject:rightFromViewFold];
[rightFromViewFold.subviews[1] setAlpha:0.0];
// the left and right side of the fold for the to- view, with a 90-degree transform and 1.0 alpha
// on the shadow, with each view positioned at the very edge of the screen
UIView *leftToViewFold = [self createSnapshotFromView:toView afterUpdates:YES location:offset left:YES];
leftToViewFold.layer.position = CGPointMake(self.reverse ? size.width : 0.0, size.height/2);
leftToViewFold.layer.transform = CATransform3DMakeRotation(M_PI_2, 0.0, 1.0, 0.0);
[toViewFolds addObject:leftToViewFold];
UIView *rightToViewFold = [self createSnapshotFromView:toView afterUpdates:YES location:offset + foldWidth left:NO];
rightToViewFold.layer.position = CGPointMake(self.reverse ? size.width : 0.0, size.height/2);
rightToViewFold.layer.transform = CATransform3DMakeRotation(-M_PI_2, 0.0, 1.0, 0.0);
[toViewFolds addObject:rightToViewFold];
}
// move the from- view off screen
fromView.frame = CGRectOffset(fromView.frame, fromView.frame.size.width, 0);
// create the animation
NSTimeInterval duration = [self transitionDuration:transitionContext];
[UIView animateWithDuration:duration animations:^{
// set the final state for each fold
for (int i=0; i<self.folds; i++){
float offset = (float)i * foldWidth * 2;
// the left and right side of the fold for the from- view, with 90 degree transform and 1.0 alpha
// on the shadow, with each view positioned at the edge of thw screen.
UIView* leftFromView = fromViewFolds[i*2];
leftFromView.layer.position = CGPointMake(self.reverse ? 0.0 : size.width, size.height/2);
leftFromView.layer.transform = CATransform3DRotate(transform, M_PI_2, 0.0, 1.0, 0);
[leftFromView.subviews[1] setAlpha:1.0];
UIView* rightFromView = fromViewFolds[i*2+1];
rightFromView.layer.position = CGPointMake(self.reverse ? 0.0 : size.width, size.height/2);
rightFromView.layer.transform = CATransform3DRotate(transform, -M_PI_2, 0.0, 1.0, 0);
[rightFromView.subviews[1] setAlpha:1.0];
// the left and right side of the fold for the to- view, with identity transform and 0.0 alpha
// on the shadow, with each view at its final position
UIView* leftToView = toViewFolds[i*2];
leftToView.layer.position = CGPointMake(offset, size.height/2);
leftToView.layer.transform = CATransform3DIdentity;
[leftToView.subviews[1] setAlpha:0.0];
UIView* rightToView = toViewFolds[i*2+1];
rightToView.layer.position = CGPointMake(offset + foldWidth * 2, size.height/2);
rightToView.layer.transform = CATransform3DIdentity;
[rightToView.subviews[1] setAlpha:0.0];
}
} completion:^(BOOL finished) {
// remove the snapshot views
for (UIView *view in toViewFolds) {
[view removeFromSuperview];
}
for (UIView *view in fromViewFolds) {
[view removeFromSuperview];
}
BOOL transitionFinished = ![transitionContext transitionWasCancelled];
if (transitionFinished) {
// restore the to- and from- to the initial location
toView.frame = containerView.bounds;
fromView.frame = containerView.bounds;
}
else {
// restore the from- to the initial location if cancelled
fromView.frame = containerView.bounds;
}
[transitionContext completeTransition:transitionFinished];
}];
}
// creates a snapshot for the gives view
-(UIView*) createSnapshotFromView:(UIView *)view afterUpdates:(BOOL)afterUpdates location:(CGFloat)offset left:(BOOL)left {
CGSize size = view.frame.size;
UIView *containerView = view.superview;
float foldWidth = size.width * 0.5 / (float)self.folds ;
UIView* snapshotView;
if (!afterUpdates) {
// create a regular snapshot
CGRect snapshotRegion = CGRectMake(offset, 0.0, foldWidth, size.height);
snapshotView = [view resizableSnapshotViewFromRect:snapshotRegion afterScreenUpdates:afterUpdates withCapInsets:UIEdgeInsetsZero];
} else {
// for the to- view for some reason the snapshot takes a while to create. Here we place the snapshot within
// another view, with the same bckground color, so that it is less noticeable when the snapshot initially renders
snapshotView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, foldWidth, size.height)];
snapshotView.backgroundColor = view.backgroundColor;
CGRect snapshotRegion = CGRectMake(offset, 0.0, foldWidth, size.height);
UIView* snapshotView2 = [view resizableSnapshotViewFromRect:snapshotRegion afterScreenUpdates:afterUpdates withCapInsets:UIEdgeInsetsZero];
[snapshotView addSubview:snapshotView2];
}
// create a shadow
UIView* snapshotWithShadowView = [self addShadowToView:snapshotView reverse:left];
// add to the container
[containerView addSubview:snapshotWithShadowView];
// set the anchor to the left or right edge of the view
snapshotWithShadowView.layer.anchorPoint = CGPointMake( left ? 0.0 : 1.0, 0.5);
return snapshotWithShadowView;
}
// adds a gradient to an image by creating a containing UIView with both the given view
// and the gradient as subviews
- (UIView*)addShadowToView:(UIView*)view reverse:(BOOL)reverse {
// create a view with the same frame
UIView* viewWithShadow = [[UIView alloc] initWithFrame:view.frame];
// create a shadow
UIView* shadowView = [[UIView alloc] initWithFrame:viewWithShadow.bounds];
CAGradientLayer *gradient = [CAGradientLayer layer];
gradient.frame = shadowView.bounds;
gradient.colors = @[(id)[UIColor colorWithWhite:0.0 alpha:0.0].CGColor,
(id)[UIColor colorWithWhite:0.0 alpha:1.0].CGColor];
gradient.startPoint = CGPointMake(reverse ? 0.0 : 1.0, reverse ? 0.2 : 0.0);
gradient.endPoint = CGPointMake(reverse ? 1.0 : 0.0, reverse ? 0.0 : 1.0);
[shadowView.layer insertSublayer:gradient atIndex:1];
// add the original view into our new view
view.frame = view.bounds;
[viewWithShadow addSubview:view];
// place the shadow on top
[viewWithShadow addSubview:shadowView];
return viewWithShadow;
}
@end
================================================
FILE: AnimationControllers/CENatGeoAnimationController.h
================================================
//
// CENatGeoAnimationController.h
// TransitionsDemo
//
// Created by Paweł Wrzosek on 22.10.2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CEReversibleAnimationController.h"
/**
NatGeo-inspired transition adopted to iOS7 API.
@see https://github.com/michaelhenry/MHNatGeoViewControllerTransition
*/
@interface CENatGeoAnimationController : CEReversibleAnimationController
@end
================================================
FILE: AnimationControllers/CENatGeoAnimationController.m
================================================
//
// CENatGeoAnimationController.m
// TransitionsDemo
//
// Created by Paweł Wrzosek on 22.10.2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CENatGeoAnimationController.h"
static const CGFloat kAnimationFirstPartRatio = 0.8f;
@implementation CENatGeoAnimationController
- (void)animateTransition:(id <UIViewControllerContextTransitioning>)transitionContext {
// Grab the from and to view controllers from the context
UIViewController *fromViewController = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey];
UIViewController *toViewController = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
[transitionContext.containerView addSubview:fromViewController.view];
[transitionContext.containerView addSubview:toViewController.view];
CALayer *fromLayer;
CALayer *toLayer;
if (self.reverse) {
toViewController.view.userInteractionEnabled = YES;
fromLayer = toViewController.view.layer;
toLayer = fromViewController.view.layer;
// Reset to initial transform
sourceLastTransform(fromLayer);
destinationLastTransform(toLayer);
//Perform animation
[UIView animateKeyframesWithDuration:self.duration
delay:0.0
options:UIViewKeyframeAnimationOptionCalculationModeCubic
animations:^{
[UIView addKeyframeWithRelativeStartTime:0.0f
relativeDuration:kAnimationFirstPartRatio
animations:^{
sourceFirstTransform(fromLayer);
}];
[UIView addKeyframeWithRelativeStartTime:0.0f
relativeDuration:1.0f
animations:^{
destinationFirstTransform(toLayer);
}];
} completion:^(BOOL finished) {
// Bring the from view back to the front and re-disable the user
// interaction of the to view since the dismissal has been cancelled
if ([transitionContext transitionWasCancelled])
{
[transitionContext.containerView bringSubviewToFront:fromViewController.view];
toViewController.view.userInteractionEnabled = NO;
}
fromViewController.view.layer.transform = CATransform3DIdentity;
toViewController.view.layer.transform = CATransform3DIdentity;
transitionContext.containerView.layer.transform = CATransform3DIdentity;
[transitionContext completeTransition:![transitionContext transitionWasCancelled]];
}];
} else {
fromViewController.view.userInteractionEnabled = NO;
fromLayer = fromViewController.view.layer;
toLayer = toViewController.view.layer;
// Change anchor point and reposition it.
CGRect oldFrame = fromLayer.frame;
[fromLayer setAnchorPoint:CGPointMake(0.0f, 0.5f)];
[fromLayer setFrame:oldFrame];
// Reset to initial transform
sourceFirstTransform(fromLayer);
destinationFirstTransform(toLayer);
//Perform animation
[UIView animateKeyframesWithDuration:self.duration
delay:0.0
options:UIViewKeyframeAnimationOptionCalculationModeCubic
animations:^{
[UIView addKeyframeWithRelativeStartTime:0.0f
relativeDuration:1.0f
animations:^{
destinationLastTransform(toLayer);
}];
[UIView addKeyframeWithRelativeStartTime:(1.0f - kAnimationFirstPartRatio)
relativeDuration:kAnimationFirstPartRatio
animations:^{
sourceLastTransform(fromLayer);
}];
} completion:^(BOOL finished) {
// Bring the from view back to the front and re-enable its user
// interaction since the presentation has been cancelled
if ([transitionContext transitionWasCancelled])
{
[transitionContext.containerView bringSubviewToFront:fromViewController.view];
fromViewController.view.userInteractionEnabled = YES;
}
fromViewController.view.layer.transform = CATransform3DIdentity;
toViewController.view.layer.transform = CATransform3DIdentity;
transitionContext.containerView.layer.transform = CATransform3DIdentity;
[transitionContext completeTransition:![transitionContext transitionWasCancelled]];
}];
}
}
#pragma mark -
#pragma mark - Required 3d Transform
static void sourceFirstTransform(CALayer *layer) {
CATransform3D t = CATransform3DIdentity;
t.m34 = 1.0 / -500;
t = CATransform3DTranslate(t, 0.0f, 0.0f, 0.0f);
layer.transform = t;
}
static void sourceLastTransform(CALayer *layer) {
CATransform3D t = CATransform3DIdentity;
t.m34 = 1.0 / -500.0f;
t = CATransform3DRotate(t, radianFromDegree(80), 0.0f, 1.0f, 0.0f);
t = CATransform3DTranslate(t, 0.0f, 0.0f, -30.0f);
t = CATransform3DTranslate(t, 170.0f, 0.0f, 0.0f);
layer.transform = t;
}
static void destinationFirstTransform(CALayer * layer) {
CATransform3D t = CATransform3DIdentity;
t.m34 = 1.0f / -500.0f;
// Rotate 5 degrees within the axis of z axis
t = CATransform3DRotate(t, radianFromDegree(5.0f), 0.0f, 0.0f, 1.0f);
// Reposition toward to the left where it initialized
t = CATransform3DTranslate(t, 320.0f, -40.0f, 150.0f);
// Rotate it -45 degrees within the y axis
t = CATransform3DRotate(t, radianFromDegree(-45), 0.0f, 1.0f, 0.0f);
// Rotate it 10 degrees within thee x axis
t = CATransform3DRotate(t, radianFromDegree(10), 1.0f, 0.0f, 0.0f);
layer.transform = t;
}
static void destinationLastTransform(CALayer * layer) {
CATransform3D t = CATransform3DIdentity;
t.m34 = 1.0/ -500;
// Rotate to 0 degrees within z axis
t = CATransform3DRotate(t, radianFromDegree(0), 0.0f, 0.0f, 1.0f);
// Bring back to the final position
t = CATransform3DTranslate(t, 0.0f, 0.0f, 0.0f);
// Rotate 0 degrees within y axis
t = CATransform3DRotate(t, radianFromDegree(0), 0.0f, 1.0f, 0.0f);
// Rotate 0 degrees within x axis
t = CATransform3DRotate(t, radianFromDegree(0), 1.0f, 0.0f, 0.0f);
layer.transform = t;
}
#pragma mark - Convert Degrees to Radian
static double radianFromDegree(float degrees) {
return (degrees / 180) * M_PI;
}
@end
================================================
FILE: AnimationControllers/CEPanAnimationController.h
================================================
//
// CEPanAnimationController.h
// TransitionsDemo
//
// Created by Alvin Zeng on 01/08/2014.
// Copyright (c) 2014 Alvin Zeng. All rights reserved.
//
#import "CEReversibleAnimationController.h"
/**
Animates between the two view controllers by performing a simple pan.
*/
@interface CEPanAnimationController : CEReversibleAnimationController
@end
================================================
FILE: AnimationControllers/CEPanAnimationController.m
================================================
//
// CEPanAnimationController.m
// TransitionsDemo
//
// Created by Alvin Zeng on 01/08/2014.
// Copyright (c) 2014 Alvin Zeng. All rights reserved.
//
#import "CEPanAnimationController.h"
@implementation CEPanAnimationController
- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext fromVC:(UIViewController *)fromVC toVC:(UIViewController *)toVC fromView:(UIView *)fromView toView:(UIView *)toView {
self.duration = .3;
// Add the toView to the container
UIView* containerView = [transitionContext containerView];
[containerView addSubview:toView];
toView.frame = CGRectMake(self.reverse ? -160 : 320, toView.frame.origin.y, toView.frame.size.width, toView.frame.size.height);
self.reverse ? [containerView sendSubviewToBack:toView] : [containerView bringSubviewToFront:toView];
// animate
NSTimeInterval duration = [self transitionDuration:transitionContext];
[UIView animateWithDuration:duration animations:^{
fromView.frame = CGRectMake(!self.reverse ? -160 : 320, fromView.frame.origin.y, fromView.frame.size.width, fromView.frame.size.height);
toView.frame = CGRectMake(0, toView.frame.origin.y, toView.frame.size.width, toView.frame.size.height);
} completion:^(BOOL finished) {
if ([transitionContext transitionWasCancelled]) {
toView.frame = CGRectMake(0, toView.frame.origin.y, toView.frame.size.width, toView.frame.size.height);
fromView.frame = CGRectMake(0, fromView.frame.origin.y, fromView.frame.size.width, fromView.frame.size.height);
} else {
// reset from- view to its original state
[fromView removeFromSuperview];
fromView.frame = CGRectMake(!self.reverse ? -160 : 320, fromView.frame.origin.y, fromView.frame.size.width, fromView.frame.size.height);
toView.frame = CGRectMake(0, toView.frame.origin.y, toView.frame.size.width, toView.frame.size.height);
}
[transitionContext completeTransition:![transitionContext transitionWasCancelled]];
}];
}
@end
================================================
FILE: AnimationControllers/CEPortalAnimationController.h
================================================
//
// ZENPortalAnimationController.h
// ZEN BabyBook
//
// Created by Frédéric ADDA on 07/12/2013.
// Copyright (c) 2013 Frédéric ADDA. All rights reserved.
//
#import "CEReversibleAnimationController.h"
/*
Animates between the two view controllers using a portal-opening transition.
*/
@interface CEPortalAnimationController : CEReversibleAnimationController
@end
================================================
FILE: AnimationControllers/CEPortalAnimationController.m
================================================
//
// ZENPortalAnimationController.m
// ZEN BabyBook
//
// Created by Frédéric ADDA on 07/12/2013.
// Copyright (c) 2013 Frédéric ADDA. All rights reserved.
//
#import "CEPortalAnimationController.h"
@implementation CEPortalAnimationController
- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext fromVC:(UIViewController *)fromVC toVC:(UIViewController *)toVC fromView:(UIView *)fromView toView:(UIView *)toView {
if(self.reverse){
[self executeReverseAnimation:transitionContext fromVC:fromVC toVC:toVC fromView:fromView toView:toView];
} else {
[self executeForwardsAnimation:transitionContext fromVC:fromVC toVC:toVC fromView:fromView toView:toView];
}
}
#define ZOOM_SCALE 0.8
- (void)executeForwardsAnimation:(id<UIViewControllerContextTransitioning>)transitionContext fromVC:(UIViewController *)fromVC toVC:(UIViewController *)toVC fromView:(UIView *)fromView toView:(UIView *)toView {
UIView *containerView = [transitionContext containerView];
// Add a reduced snapshot of the toView to the container
UIView *toViewSnapshot = [toView resizableSnapshotViewFromRect:toView.frame afterScreenUpdates:YES withCapInsets:UIEdgeInsetsZero];
CATransform3D scale = CATransform3DIdentity;
toViewSnapshot.layer.transform = CATransform3DScale(scale, ZOOM_SCALE, ZOOM_SCALE, 1);
[containerView addSubview:toViewSnapshot];
[containerView sendSubviewToBack:toViewSnapshot];
// Create two-part snapshots of the from- view
// snapshot the left-hand side of the from- view
CGRect leftSnapshotRegion = CGRectMake(0, 0, fromView.frame.size.width / 2, fromView.frame.size.height);
UIView *leftHandView = [fromView resizableSnapshotViewFromRect:leftSnapshotRegion afterScreenUpdates:NO withCapInsets:UIEdgeInsetsZero];
leftHandView.frame = leftSnapshotRegion;
[containerView addSubview:leftHandView];
// snapshot the right-hand side of the from- view
CGRect rightSnapshotRegion = CGRectMake(fromView.frame.size.width / 2, 0, fromView.frame.size.width / 2, fromView.frame.size.height);
UIView *rightHandView = [fromView resizableSnapshotViewFromRect:rightSnapshotRegion afterScreenUpdates:NO withCapInsets:UIEdgeInsetsZero];
rightHandView.frame = rightSnapshotRegion;
[containerView addSubview:rightHandView];
// remove the view that was snapshotted
[fromView removeFromSuperview];
// animate
NSTimeInterval duration = [self transitionDuration:transitionContext];
[UIView animateWithDuration:duration
delay:0.0
options:UIViewAnimationOptionCurveEaseOut
animations:^{
// Open the portal doors of the from-view
leftHandView.frame = CGRectOffset(leftHandView.frame, - leftHandView.frame.size.width, 0);
rightHandView.frame = CGRectOffset(rightHandView.frame, rightHandView.frame.size.width, 0);
// zoom in the to-view
toViewSnapshot.center = toView.center;
toViewSnapshot.frame = toView.frame;
} completion:^(BOOL finished) {
// remove all the temporary views
if ([transitionContext transitionWasCancelled]) {
[containerView addSubview:fromView];
[self removeOtherViews:fromView];
} else {
// add the real to- view and remove the snapshots
[containerView addSubview:toView];
[self removeOtherViews:toView];
}
// inform the context of completion
[transitionContext completeTransition:![transitionContext transitionWasCancelled]];
}];
}
- (void)executeReverseAnimation:(id<UIViewControllerContextTransitioning>)transitionContext fromVC:(UIViewController *)fromVC toVC:(UIViewController *)toVC fromView:(UIView *)fromView toView:(UIView *)toView {
UIView *containerView = [transitionContext containerView];
// Add the from-view to the container
[containerView addSubview:fromView];
// add the to- view and send offscreen (we need to do this in order to allow snapshotting)
toView.frame = [transitionContext finalFrameForViewController:toVC];
toView.frame = CGRectOffset(toView.frame, toView.frame.size.width, 0);
[containerView addSubview:toView];
// Create two-part snapshots of the to- view
// snapshot the left-hand side of the to- view
CGRect leftSnapshotRegion = CGRectMake(0, 0, toView.frame.size.width / 2, toView.frame.size.height);
UIView *leftHandView = [toView resizableSnapshotViewFromRect:leftSnapshotRegion afterScreenUpdates:YES withCapInsets:UIEdgeInsetsZero];
leftHandView.frame = leftSnapshotRegion;
// reverse animation : start from beyond the edges of the screen
leftHandView.frame = CGRectOffset(leftHandView.frame, - leftHandView.frame.size.width, 0);
[containerView addSubview:leftHandView];
// snapshot the right-hand side of the to- view
CGRect rightSnapshotRegion = CGRectMake(toView.frame.size.width / 2, 0, toView.frame.size.width / 2, toView.frame.size.height);
UIView *rightHandView = [toView resizableSnapshotViewFromRect:rightSnapshotRegion afterScreenUpdates:YES withCapInsets:UIEdgeInsetsZero];
rightHandView.frame = rightSnapshotRegion;
// reverse animation : start from beyond the edges of the screen
rightHandView.frame = CGRectOffset(rightHandView.frame, rightHandView.frame.size.width, 0);
[containerView addSubview:rightHandView];
// animate
NSTimeInterval duration = [self transitionDuration:transitionContext];
[UIView animateWithDuration:duration
delay:0.0
options:UIViewAnimationOptionCurveEaseOut
animations:^{
// Close the portal doors of the to-view
leftHandView.frame = CGRectOffset(leftHandView.frame, leftHandView.frame.size.width, 0);
rightHandView.frame = CGRectOffset(rightHandView.frame, - rightHandView.frame.size.width, 0);
// Zoom out the from-view
CATransform3D scale = CATransform3DIdentity;
fromView.layer.transform = CATransform3DScale(scale, ZOOM_SCALE, ZOOM_SCALE, 1);
} completion:^(BOOL finished) {
// remove all the temporary views
if ([transitionContext transitionWasCancelled]) {
[self removeOtherViews:fromView];
} else {
[self removeOtherViews:toView];
toView.frame = containerView.bounds;
}
// inform the context of completion
[transitionContext completeTransition:![transitionContext transitionWasCancelled]];
}];
}
// removes all the views other than the given view from the superview
- (void)removeOtherViews:(UIView*)viewToKeep {
UIView *containerView = viewToKeep.superview;
for (UIView *view in containerView.subviews) {
if (view != viewToKeep) {
[view removeFromSuperview];
}
}
}
@end
================================================
FILE: AnimationControllers/CEReversibleAnimationController.h
================================================
//
// CEBaseAnimationController.h
// ViewControllerTransitions
//
// Created by Colin Eberhardt on 09/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
A base class for animation controllers which provide reversible animations. A reversible animation is often used with navigation controllers where the reverse property is set based on whether this is a push or pop operation, or for modal view controllers where the reverse property is set based o whether this is a show / dismiss.
*/
@interface CEReversibleAnimationController : NSObject <UIViewControllerAnimatedTransitioning>
/**
The direction of the animation.
*/
@property (nonatomic, assign) BOOL reverse;
/**
The animation duration.
*/
@property (nonatomic, assign) NSTimeInterval duration;
- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext fromVC:(UIViewController *)fromVC toVC:(UIViewController *)toVC fromView:(UIView *)fromView toView:(UIView *)toView;
@end
================================================
FILE: AnimationControllers/CEReversibleAnimationController.m
================================================
//
// CEBaseAnimationController.m
// ViewControllerTransitions
//
// Created by Colin Eberhardt on 09/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CEReversibleAnimationController.h"
@implementation CEReversibleAnimationController
- (id)init {
if (self = [super init]) {
self.duration = 1.0f;
}
return self;
}
- (NSTimeInterval)transitionDuration:(id<UIViewControllerContextTransitioning>)transitionContext {
return self.duration;
}
- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext {
UIViewController *fromVC = [transitionContext viewControllerForKey:UITransitionContextFromViewControllerKey];
UIViewController *toVC = [transitionContext viewControllerForKey:UITransitionContextToViewControllerKey];
UIView *toView = toVC.view;
UIView *fromView = fromVC.view;
[self animateTransition:transitionContext fromVC:fromVC toVC:toVC fromView:fromView toView:toView];
}
- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext fromVC:(UIViewController *)fromVC toVC:(UIViewController *)toVC fromView:(UIView *)fromView toView:(UIView *)toView {
}
@end
================================================
FILE: AnimationControllers/CETurnAnimationController.h
================================================
//
// CEFlipAnimationController.h
// ViewControllerTransitions
//
// Created by Colin Eberhardt on 08/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "CEReversibleAnimationController.h"
typedef NS_ENUM(NSInteger, CEDirection) {
CEDirectionHorizontal,
CEDirectionVertical
};
/**
Animates between the two view controllers by performing a 3D flip, to reveal the destination view on the back.The turn animation has a `flipDirection` property that specifies the turn orientation.
*/
@interface CETurnAnimationController : CEReversibleAnimationController
@property (nonatomic, assign) CEDirection flipDirection;
@end
================================================
FILE: AnimationControllers/CETurnAnimationController.m
================================================
//
// CEFlipAnimationController.m
// ViewControllerTransitions
//
// Created by Colin Eberhardt on 08/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CETurnAnimationController.h"
#import <QuartzCore/QuartzCore.h>
@implementation CETurnAnimationController
- (id)init {
if (self = [super init]) {
self.flipDirection = CEDirectionVertical;
}
return self;
}
- (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext fromVC:(UIViewController *)fromVC toVC:(UIViewController *)toVC fromView:(UIView *)fromView toView:(UIView *)toView {
// Add the toView to the container
UIView* containerView = [transitionContext containerView];
[containerView addSubview:toView];
// Add a perspective transform
CATransform3D transform = CATransform3DIdentity;
transform.m34 = -0.002;
[containerView.layer setSublayerTransform:transform];
// Give both VCs the same start frame
CGRect initialFrame = [transitionContext initialFrameForViewController:fromVC];
fromView.frame = initialFrame;
toView.frame = initialFrame;
// reverse?
float factor = self.reverse ? 1.0 : -1.0;
// flip the to VC halfway round - hiding it
toView.layer.transform = [self rotate:factor * -M_PI_2];
// animate
NSTimeInterval duration = [self transitionDuration:transitionContext];
[UIView animateKeyframesWithDuration:duration
delay:0.0
options:0
animations:^{
[UIView addKeyframeWithRelativeStartTime:0.0
relativeDuration:0.5
animations:^{
// rotate the from view
fromView.layer.transform = [self rotate:factor * M_PI_2];
}];
[UIView addKeyframeWithRelativeStartTime:0.5
relativeDuration:0.5
animations:^{
// rotate the to view
toView.layer.transform = [self rotate:0.0];
}];
} completion:^(BOOL finished) {
[transitionContext completeTransition:![transitionContext transitionWasCancelled]];
}];
}
- (CATransform3D) rotate:(CGFloat) angle {
if (self.flipDirection == CEDirectionHorizontal)
return CATransform3DMakeRotation(angle, 1.0, 0.0, 0.0);
else
return CATransform3DMakeRotation(angle, 0.0, 1.0, 0.0);
}
@end
================================================
FILE: CHANGELOG.md
================================================
# Version 1.1.0
+ Added `CECardsAnimationController`
+ Added `CEVerticalSwipeInteractionController`
+ Renamed `CESwipeInteractionController` to `CEHorizontalInteractionController`
# Version 1.0.0
Initial release.
================================================
FILE: InteractionControllers/CEBaseInteractionController.h
================================================
//
// CEBaseInteractionController.h
// ViewControllerTransitions
//
// Created by Colin Eberhardt on 10/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import <UIKit/UIKit.h>
/**
An enumeration that describes the navigation operation that an interaction controller should initiate.
*/
typedef NS_ENUM(NSInteger, CEInteractionOperation) {
/**
Indicates that the interaction controller should start a navigation controller 'pop' navigation.
*/
CEInteractionOperationPop,
/**
Indicates that the interaction controller should initiate a modal 'dismiss'.
*/
CEInteractionOperationDismiss,
/**
Indicates that the interaction controller should navigate between tabs.
*/
CEInteractionOperationTab
};
/**
A base class for interaction controllers that can be used with navigation controllers to perform pop operations, or with view controllers that have been presented modally to perform dismissal.
*/
@interface CEBaseInteractionController : UIPercentDrivenInteractiveTransition
/**
Connects this interaction controller to the given view controller.
@param viewController The view controller which this interaction should add a gesture recognizer to.
@param operation The operation that this interaction initiates when.
*/
- (void)wireToViewController:(UIViewController*)viewController forOperation:(CEInteractionOperation)operation;
/**
This property indicates whether an interactive transition is in progress.
*/
@property (nonatomic, assign) BOOL interactionInProgress;
@end
================================================
FILE: InteractionControllers/CEBaseInteractionController.m
================================================
//
// CEBaseInteractionController.m
// ViewControllerTransitions
//
// Created by Colin Eberhardt on 10/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CEBaseInteractionController.h"
@implementation CEBaseInteractionController
- (void)wireToViewController:(UIViewController *)viewController forOperation:(CEInteractionOperation)operation {
@throw [NSException exceptionWithName:NSInternalInconsistencyException
reason:[NSString stringWithFormat:@"You must override %@ in a subclass", NSStringFromSelector(_cmd)]
userInfo:nil];
}
@end
================================================
FILE: InteractionControllers/CEHorizontalSwipeInteractionController.h
================================================
//
// SwipeInteractionController.h
// ILoveCatz
//
// Created by Colin Eberhardt on 22/08/2013.
// Copyright (c) 2013 com.razeware. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CEBaseInteractionController.h"
/**
A horizontal swipe interaction controller. When used with a navigation controller, a right-to-left, or left-to-right swipe
will cause a 'pop' navigation. When used wth a tabbar controller, right-to-left and left-to-right cause navigation
between neighbouring tabs.
*/
@interface CEHorizontalSwipeInteractionController : CEBaseInteractionController
/**
Indicates whether a navigation controller 'pop' should occur on a right-to-left, or a left-to-right
swipe. This property does not affect tab controller or modal interactions.
*/
@property (nonatomic) BOOL popOnRightToLeft;
@end
================================================
FILE: InteractionControllers/CEHorizontalSwipeInteractionController.m
================================================
//
// SwipeINteractionController.m
// ILoveCatz
//
// Created by Colin Eberhardt on 22/08/2013.
// Copyright (c) 2013 com.razeware. All rights reserved.
//
#import "CEHorizontalSwipeInteractionController.h"
#import <objc/runtime.h>
const NSString *kCEHorizontalSwipeGestureKey = @"kCEHorizontalSwipeGestureKey";
@implementation CEHorizontalSwipeInteractionController {
BOOL _shouldCompleteTransition;
UIViewController *_viewController;
CEInteractionOperation _operation;
}
- (void)wireToViewController:(UIViewController *)viewController forOperation:(CEInteractionOperation)operation{
self.popOnRightToLeft = YES;
_operation = operation;
_viewController = viewController;
[self prepareGestureRecognizerInView:viewController.view];
}
- (void)prepareGestureRecognizerInView:(UIView*)view {
UIPanGestureRecognizer *gesture = objc_getAssociatedObject(view, (__bridge const void *)(kCEHorizontalSwipeGestureKey));
if (gesture) {
[view removeGestureRecognizer:gesture];
}
gesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)];
[view addGestureRecognizer:gesture];
objc_setAssociatedObject(view, (__bridge const void *)(kCEHorizontalSwipeGestureKey), gesture,OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
- (CGFloat)completionSpeed
{
return 1 - self.percentComplete;
}
- (void)handleGesture:(UIPanGestureRecognizer*)gestureRecognizer {
CGPoint translation = [gestureRecognizer translationInView:gestureRecognizer.view.superview];
CGPoint vel = [gestureRecognizer velocityInView:gestureRecognizer.view];
switch (gestureRecognizer.state) {
case UIGestureRecognizerStateBegan: {
BOOL rightToLeftSwipe = vel.x < 0;
// perform the required navigation operation ...
if (_operation == CEInteractionOperationPop) {
// for pop operation, fire on right-to-left
if ((self.popOnRightToLeft && rightToLeftSwipe) ||
(!self.popOnRightToLeft && !rightToLeftSwipe)) {
self.interactionInProgress = YES;
[_viewController.navigationController popViewControllerAnimated:YES];
}
} else if (_operation == CEInteractionOperationTab) {
// for tab controllers, we need to determine which direction to transition
if (rightToLeftSwipe) {
if (_viewController.tabBarController.selectedIndex < _viewController.tabBarController.viewControllers.count - 1) {
self.interactionInProgress = YES;
_viewController.tabBarController.selectedIndex++;
}
} else {
if (_viewController.tabBarController.selectedIndex > 0) {
self.interactionInProgress = YES;
_viewController.tabBarController.selectedIndex--;
}
}
} else {
// for dismiss, fire regardless of the translation direction
self.interactionInProgress = YES;
[_viewController dismissViewControllerAnimated:YES completion:nil];
}
break;
}
case UIGestureRecognizerStateChanged: {
if (self.interactionInProgress) {
// compute the current position
CGFloat fraction = fabs(translation.x / 200.0);
fraction = fminf(fmaxf(fraction, 0.0), 1.0);
_shouldCompleteTransition = (fraction > 0.5);
// if an interactive transitions is 100% completed via the user interaction, for some reason
// the animation completion block is not called, and hence the transition is not completed.
// This glorious hack makes sure that this doesn't happen.
// see: https://github.com/ColinEberhardt/VCTransitionsLibrary/issues/4
if (fraction >= 1.0)
fraction = 0.99;
[self updateInteractiveTransition:fraction];
}
break;
}
case UIGestureRecognizerStateEnded:
case UIGestureRecognizerStateCancelled:
if (self.interactionInProgress) {
self.interactionInProgress = NO;
if (!_shouldCompleteTransition || gestureRecognizer.state == UIGestureRecognizerStateCancelled) {
[self cancelInteractiveTransition];
}
else {
[self finishInteractiveTransition];
}
}
break;
default:
break;
}
}
@end
================================================
FILE: InteractionControllers/CEPinchInteractionController.h
================================================
//
// CEPinchInteractionController.h
// TransitionsDemo
//
// Created by Colin Eberhardt on 16/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CEBaseInteractionController.h"
@interface CEPinchInteractionController : CEBaseInteractionController
@end
================================================
FILE: InteractionControllers/CEPinchInteractionController.m
================================================
//
// CEPinchInteractionController.m
// TransitionsDemo
//
// Created by Colin Eberhardt on 16/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CEPinchInteractionController.h"
#import <objc/runtime.h>
const NSString *kCEPinchGestureKey = @"kCEPinchGestureKey";
@implementation CEPinchInteractionController{
BOOL _shouldCompleteTransition;
UIViewController *_viewController;
CEInteractionOperation _operation;
CGFloat _startScale;
}
- (void)wireToViewController:(UIViewController *)viewController forOperation:(CEInteractionOperation)operation{
_operation = operation;
_viewController = viewController;
[self prepareGestureRecognizerInView:viewController.view];
}
- (void)prepareGestureRecognizerInView:(UIView*)view {
UIPinchGestureRecognizer *gesture = objc_getAssociatedObject(view, (__bridge const void *)(kCEPinchGestureKey));
if (gesture) {
[view removeGestureRecognizer:gesture];
}
gesture = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)];
[view addGestureRecognizer:gesture];
objc_setAssociatedObject(view, (__bridge const void *)(kCEPinchGestureKey), gesture,OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
- (CGFloat)completionSpeed
{
return 1 - self.percentComplete;
}
- (void)handleGesture:(UIPinchGestureRecognizer*)gestureRecognizer {
switch (gestureRecognizer.state) {
case UIGestureRecognizerStateBegan:
_startScale = gestureRecognizer.scale;
// start an interactive transition!
self.interactionInProgress = YES;
// perform the required operation
if (_operation == CEInteractionOperationPop) {
[_viewController.navigationController popViewControllerAnimated:YES];
} else {
[_viewController dismissViewControllerAnimated:YES completion:nil];
}
break;
case UIGestureRecognizerStateChanged: {
// compute the current pinch fraction
CGFloat fraction = 1.0 - gestureRecognizer.scale / _startScale;
_shouldCompleteTransition = (fraction > 0.5);
[self updateInteractiveTransition:fraction];
break;
}
case UIGestureRecognizerStateEnded:
case UIGestureRecognizerStateCancelled:
self.interactionInProgress = NO;
if (!_shouldCompleteTransition || gestureRecognizer.state == UIGestureRecognizerStateCancelled) {
[self cancelInteractiveTransition];
}
else {
[self finishInteractiveTransition];
}
break;
default:
break;
}
}
@end
================================================
FILE: InteractionControllers/CEVerticalSwipeInteractionController.h
================================================
//
// CEVerticalSwipeInteactionController.h
// TransitionsDemo
//
// Created by Colin Eberhardt on 22/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CEBaseInteractionController.h"
/**
A horizontal swipe interaction controller. When used with a navigation controller, a top-to-bottom swipe
will cause a 'pop' navigation. This interaction controller cannot be used with a tabbar controller. That would be silly.
*/
@interface CEVerticalSwipeInteractionController : CEBaseInteractionController
@end
================================================
FILE: InteractionControllers/CEVerticalSwipeInteractionController.m
================================================
//
// CEVerticalSwipeInteactionController.m
// TransitionsDemo
//
// Created by Colin Eberhardt on 22/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "CEVerticalSwipeInteractionController.h"
#import <objc/runtime.h>
const NSString *kCEVerticalSwipeGestureKey = @"kCEVerticalSwipeGestureKey";
@implementation CEVerticalSwipeInteractionController {
BOOL _shouldCompleteTransition;
UIViewController *_viewController;
CEInteractionOperation _operation;
}
- (void)wireToViewController:(UIViewController *)viewController forOperation:(CEInteractionOperation)operation{
if (operation == CEInteractionOperationTab) {
@throw [NSException exceptionWithName:NSInternalInconsistencyException
reason:@"You cannot use a vertical swipe interaction with a tabbar controller - that would be silly!"
userInfo:nil];
}
_operation = operation;
_viewController = viewController;
[self prepareGestureRecognizerInView:viewController.view];
}
- (void)prepareGestureRecognizerInView:(UIView*)view {
UIPanGestureRecognizer *gesture = objc_getAssociatedObject(view, (__bridge const void *)(kCEVerticalSwipeGestureKey));
if (gesture) {
[view removeGestureRecognizer:gesture];
}
gesture = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleGesture:)];
[view addGestureRecognizer:gesture];
objc_setAssociatedObject(view, (__bridge const void *)(kCEVerticalSwipeGestureKey), gesture,OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
- (CGFloat)completionSpeed
{
return 1 - self.percentComplete;
}
- (void)handleGesture:(UIPanGestureRecognizer*)gestureRecognizer {
CGPoint translation = [gestureRecognizer translationInView:gestureRecognizer.view.superview];
switch (gestureRecognizer.state) {
case UIGestureRecognizerStateBegan: {
BOOL topToBottomSwipe = translation.y > 0;
// perform the required navigation operation ...
if (_operation == CEInteractionOperationPop) {
// for pop operation, fire on top-to-bottom
if (topToBottomSwipe) {
self.interactionInProgress = YES;
[_viewController.navigationController popViewControllerAnimated:YES];
}
} else {
// for dismiss, fire regardless of the translation direction
self.interactionInProgress = YES;
[_viewController dismissViewControllerAnimated:YES completion:nil];
}
break;
}
case UIGestureRecognizerStateChanged: {
if (self.interactionInProgress) {
// compute the current position
CGFloat fraction = fabs(translation.y / 200.0);
fraction = fminf(fmaxf(fraction, 0.0), 1.0);
_shouldCompleteTransition = (fraction > 0.5);
// if an interactive transitions is 100% completed via the user interaction, for some reason
// the animation completion block is not called, and hence the transition is not completed.
// This glorious hack makes sure that this doesn't happen.
// see: https://github.com/ColinEberhardt/VCTransitionsLibrary/issues/4
if (fraction >= 1.0)
fraction = 0.99;
[self updateInteractiveTransition:fraction];
}
break;
}
case UIGestureRecognizerStateEnded:
case UIGestureRecognizerStateCancelled:
if (self.interactionInProgress) {
self.interactionInProgress = NO;
if (!_shouldCompleteTransition || gestureRecognizer.state == UIGestureRecognizerStateCancelled) {
[self cancelInteractiveTransition];
}
else {
[self finishInteractiveTransition];
}
}
break;
default:
break;
}
}
@end
================================================
FILE: MIT-LICENSE.txt
================================================
Copyright 2013 Colin Eberhardt
Linq to Objective-C
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
================================================
FILE: README.md
================================================
# View Controller Transitions Library
With iOS 7 you can easily create custom view controller transitions that can be used in a range of contexts (push, pop, modal …). This project provides a library of custom animations which can be dropped directly into your project. It also has a number of 'interaction controllers' which can be used with any of the custom animations in order to make your transitions interactive.
The library currently contains the following animations, which can be made interactive with either a swipe or pinch gesture.
<table>
<tr>
<th>Flip</th>
<th>Fold</th>
<th>Crossfade</th>
<th>Explode</th>
</tr>
<tr>
<td><img src="Screenshots/thumbnails/Flip/1.png"/></td>
<td><img src="Screenshots/thumbnails/Fold/2.png"/></td>
<td><img src="Screenshots/thumbnails/Crossfade/2.png"/></td>
<td><img src="Screenshots/thumbnails/Explode/2.png"/></td>
</tr>
<tr>
<th>Turn</th>
<th>Cards</th>
<th>NatGeo</th>
<th>Portal</th>
</tr>
<tr>
<td><img src="Screenshots/thumbnails/Turn/1a.png"/></td>
<td><img src="Screenshots/thumbnails/Cards/2.png"/></td>
<td><img src="Screenshots/thumbnails/NatGeo/2.png"/></td>
<td><img src="Screenshots/thumbnails/Portal/3.png"/></td>
</tr>
<tr>
<th>Cube</th>
<th>Pan</th>
<th></th>
<th></th>
</tr>
<tr>
<td><img src="Screenshots/thumbnails/Cube/2.png"/></td>
<td><img src="Screenshots/thumbnails/Pan/pan_2.png"/></td>
<td></td>
<td></td>
</tr>
</table>
## Contents
* [A brief introduction to custom transitions](#a-brief-introduction-to-custom-transitions)
* [Adding custom transitions to your project](#adding-custom-transitions-to-your-project)
* [Grabbing the code](#grabbing-the-code)
* [Using an animation controller](#using-an-animation-controller)
* [Custom present / dismiss transitions](#custom-present--dismiss-transitions)
* [Custom navigation controller transitions](#custom-navigation-controller-transitions)
* [Custom tab bar controller transitions](#custom-tab-bar-controller-transitions)
* [Using an interaction controller](#using-an-interaction-controller)
* [Interactive dismiss transitions](#interactive-dismiss-transitions)
* [Interactive pop transitions](#interactive-pop-transitions)
* [Interactive tab transitions](#interactive-tab-transitions)
* [Transitions library](#transitions-library)
## A brief introduction to custom transitions
The following provides a very brief introduction to the concepts, for more detailed coverage I would thoroughly recommend reading Chapter 3 of [iOS 7 By Tutorials](http://www.raywenderlich.com/store/ios-7-by-tutorials?source=ceberhardt) - which I wrote! (I've heard the other 15 chapters are pretty good too ;-)
There are two key classes involved in a custom transition:
+ **Animation controller** - this class is responsible for performing the custom transitions. When you indicate that a custom transitions should be used, you provide an animation controller. This class performs the required animation, then informs the framework when it has completed.
+ **Interaction controller** - this class is responsible for managing interactive transitions - these are transitions that typically controlled by a gesture, allowing the user to swipe, pinch or perform some other action to navigate between view controllers. Importantly, interaction controllers allow transitions to be cancelled, i.e. a user can start the navigation, change their mind, and reverse it!
**NOTE:** Animation and interaction controllers are entirely independent, this means you can wire up any interaction controller with any animation controller - which is pretty awesome.
## <a id="intro"></a>Adding custom transitions to your project
This sections gives a brief overview of the steps required to add custom view controller transitions to your project. You might also want to look at the code for the demo app (in the `TransitionsDemo` folder) for reference. If you already know how the iOS 7 custom view controller transitions work, feel free to skip this section!
### <a id="grabbing"></a>Grabbing the code
There are a couple of ways you can incorporate transitions from this library into your code:
1. **CocoaPods** - simply add a reference to **VCTransitionsLibrary** to your pod file.
2. **Manual file copy** - if you are not using CocoaPods, you can simply copy the required files into your project. The `AnimationControllers` and `InteractionControllers` folders contain all the code that is required.
### <a id="animation"></a>Using an animation controller
The `AnimationControllers` folder contains a number of animate controllers, which provide custom transitions, which can be integrated into your project as follows:
#### <a id="animationPresent"></a>Custom present / dismiss transitions
The `UIViewControllerTransitioningDelegate` protocol is used to supply animation controllers for present / dismiss transitions. When a view controller is presented or dismissed the `transitioningDelegate` property of the view controller being presented or dismissed is used to supply this delegate. Simply return one of the animation controllers in response to the `animationControllerForPresentedController: presentingController: sourceController:` message for presenting, and `animationControllerForDismissedController:` for dismissing.
#### <a id="animationNavigation"></a>Custom navigation controller transitions
The `UINavigationControllerDelegate` protocol has methods that can be used to provide animation controllers. Simply return an animation controller in response to the `navigationController: animationControllerForOperation: fromViewController: toViewController:` message.
Notice that this message has an 'operation' argument that allows you to return different animations for push and pop operations. All of the animation controllers in this library subclass `CEReversibleAnimationController` which allows you to play the animation in reverse. This is commonly used in conjunction with the navigation controller as follows:
```objc
- (id<UIViewControllerAnimatedTransitioning>)navigationController:
(UINavigationController *)navigationController
animationControllerForOperation:(UINavigationControllerOperation)operation
fromViewController:(UIViewController *)fromVC
toViewController:(UIViewController *)toVC {
// reverse the animation for 'pop' transitions
_animationController.reverse = operation == UINavigationControllerOperationPop;
return _animationController;
}
```
#### <a id="animationTab"></a>Custom tab bar controller transitions
The `UITabBarControllerDelegate` protocol has methods that can be used to provide animation controllers. Simply return an animation controller in response to the `tabBarController: animationControllerForTransitionFromViewController: toViewController:`
message.
In order to determine the animation direction, you can compare the indices of the two view controller as shown below:
```objc
- (id <UIViewControllerAnimatedTransitioning>)tabBarController:(UITabBarController *)tabBarController
animationControllerForTransitionFromViewController:(UIViewController *)fromVC
toViewController:(UIViewController *)toVC {
NSUInteger fromVCIndex = [tabBarController.viewControllers indexOfObject:fromVC];
NSUInteger toVCIndex = [tabBarController.viewControllers indexOfObject:toVC];
_animationController.reverse = fromVCIndex < toVCIndex;
return _animationController;
}
```
### <a id="interaction"></a>Using an interaction controller
Interaction controllers work in conjunction with an animation controller in order to make a transitions interactive, i.e. allow a user to control a transitions using gestures. This interactivity allows a use to move forwards, backwards and even cancel a transitions.
The interaction controller is responsible for adding gesture recognisers to the view and triggering the navigation in response to gestures from the user.
#### <a id="interactionDismiss"></a>Interactive dismiss transitions
The `UIViewControllerTransitioningDelegate` protocol that is used to supply animation controllers is also used to supply interaction controllers. An example implementation, that uses a swipe interaction together with a flip animation, is show below:
```objc
// instance variables, typically instantiated in your init method
CEFlipAnimationController *_animationController;
CESwipeInteractionController *_interactionController;
- (id<UIViewControllerAnimatedTransitioning>)
animationControllerForPresentedController:(UIViewController *)presented
presentingController:(UIViewController *)presenting
sourceController:(UIViewController *)source {
// allow the interaction controller to wire-up its gesture recognisers
[_interactionController wireToViewController:presented
forOperation:CEInteractionOperationDismiss];
_animationController.reverse = NO;
return _animationController;
}
- (id<UIViewControllerAnimatedTransitioning>)
animationControllerForDismissedController:(UIViewController *)dismissed {
_animationController.reverse = YES;
return _animationController;
}
- (id<UIViewControllerInteractiveTransitioning>)
interactionControllerForDismissal:
(id<UIViewControllerAnimatedTransitioning>)animator {
// provide the interaction controller, if an interactive transition is in progress
return _interactionController.interactionInProgress
? _interactionController : nil;
}
```
Note that in the above code the `interactionInProgress` property of the interaction controller is checked. This is because your might want to allow the user to dismiss the view controller using a button as well as via an interaction. Also, you must tell the interaction controller the operation it should perform (i.e. pop, dismiss).
#### <a id="interactionPop"></a>Interactive pop transitions
The `UINavigationControllerDelegate` protocol also has an equivalent method for returning interactions controllers. A typically implementation, which follows the same pattern as above, is shown:
```objc
// instance variables, typically instantiated in your init method
CEFlipAnimationController *_animationController;
CESwipeInteractionController *_interactionController;
- (id<UIViewControllerAnimatedTransitioning>)
navigationController:(UINavigationController *)navigationController
animationControllerForOperation:(UINavigationControllerOperation)operation
fromViewController:(UIViewController *)fromVC
toViewController:(UIViewController *)toVC {
// wire the interaction controller to the to- view controller
[_interactionController wireToViewController:toVC
forOperation:CEInteractionOperationPop];
_animationController.reverse = operation == UINavigationControllerOperationPop;
return _animationController.reverse;
}
- (id <UIViewControllerInteractiveTransitioning>)
navigationController:(UINavigationController *)navigationController
interactionControllerForAnimationController:(id <UIViewControllerAnimatedTransitioning>)animationController {
// provide the interaction controller, if an interactive transition is in progress
return _interactionController.interactionInProgress
? _interactionController : nil;
}
```
#### <a id="interactionPop"></a>Interactive tab transitions
The `UITabBarControllerDelegate` protocol has an equivalent method for returning interactions controllers. As with the navigation controller example above, the interaction controller needs to add its gesture recognisers to the view controllers that the tab bar controller navigates between. Unfortunately the tab bar delegate methods don't get fired when the first view controller is presented, so I opt for a slightly messier implementation using Key-Value observing:
```objc
@implementation TabBarViewController {
CEFoldAnimationController *_animationController;
CESwipeInteractionController *_swipeInteractionController;
}
- (id)initWithCoder:(NSCoder *)aDecoder {
if (self = [super initWithCoder:aDecoder]) {
self.delegate = self;
// create the interaction / animation controllers
_swipeInteractionController = [CESwipeInteractionController new];
_animationController = [CEFoldAnimationController new];
_animationController.folds = 3;
// observe changes in the currently presented view controller
[self addObserver:self
forKeyPath:@"selectedViewController"
options:NSKeyValueObservingOptionNew
context:nil];
}
return self;
}
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object
change:(NSDictionary *)change
context:(void *)context
{
if ([keyPath isEqualToString:@"selectedViewController"] )
{
// wire the interaction controller to the view controller
[_swipeInteractionController wireToViewController:self.selectedViewController
forOperation:CEInteractionOperationTab];
}
}
- (id <UIViewControllerAnimatedTransitioning>)tabBarController:(UITabBarController *)tabBarController
animationControllerForTransitionFromViewController:(UIViewController *)fromVC
toViewController:(UIViewController *)toVC {
NSUInteger fromVCIndex = [tabBarController.viewControllers indexOfObject:fromVC];
NSUInteger toVCIndex = [tabBarController.viewControllers indexOfObject:toVC];
_animationController.reverse = fromVCIndex < toVCIndex;
return _animationController;
}
-(id<UIViewControllerInteractiveTransitioning>)tabBarController:(UITabBarController *)tabBarController interactionControllerForAnimationController:(id<UIViewControllerAnimatedTransitioning>)animationController
{
return _swipeInteractionController.interactionInProgress ? _swipeInteractionController : nil;
}
@end
```
## <a id="library"></a>Transitions Library
The following is a graphical illustration of the various transitions. All animation controllers have a `duration` property that configures the animation duration.
### Fold animation - CEFoldAnimationController
Animates between the two view controllers using a paper-fold style transition. You can configure the number of folds via the `folds` property.




### Flip animation - CEFlipAnimationController
Animates between the two view controllers using a page-flip transition.




### NatGeo animation - CENatGeoAnimationController
Animates between the two view controllers using transition inspired by [City Guides by National Geographic](https://itunes.apple.com/us/app/city-guides-by-national-geographic/id592453480?mt=8).
It's an adoptation of [MHNatGeoViewControllerTransition](https://github.com/michaelhenry/MHNatGeoViewControllerTransition/) to iOS7 APIs.




### Turn animation - CETurnAnimationController
Animates between the two view controllers by performing a 3D flip, to reveal the destination view on the back.The turn animation has a `flipDirection` property that specifies the turn orientation.








### Crossfade animation - CECrossfadeAnimationController
Animates between the two view controllers by performing a simple cross-fade.




### Explode animation - CEExplodeAnimationController
Animates between the two view controllers by slicing the from- view controller into lots of little pieces, then randomly spinning and shrinking them.




### Cards animation - CECardsAnimationController
Gives the impression of one view controller pushing the other to the back. It looks a lot more cool than these static screenshots!
(courtesy of Tope - AppDesignVault)




### Portal animation - CEPortalAnimationController
The top-most view controller parts in the middle to reveal the view controller beneath.
(courtesy of [FreddyF](https://github.com/FredddyF))




### Cube animation - CECubeAnimationController
This transition gives the appearance of rotating the faces of a cube.
(courtesy of [Andrés Brun](https://github.com/andresbrun))




================================================
FILE: TabBarDemo/TabBarDemo/AppDelegate.h
================================================
//
// AppDelegate.h
// TabBarDemo
//
// Created by Colin Eberhardt on 17/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
================================================
FILE: TabBarDemo/TabBarDemo/AppDelegate.m
================================================
//
// AppDelegate.m
// TabBarDemo
//
// Created by Colin Eberhardt on 17/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "AppDelegate.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
return YES;
}
@end
================================================
FILE: TabBarDemo/TabBarDemo/Base.lproj/Main_iPad.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4451" systemVersion="13A461" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3676"/>
</dependencies>
<scenes>
<!--class Prefix:identifier View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="ViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="20" width="768" height="1004"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar" statusBarStyle="blackOpaque"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination"/>
</simulatedMetricsContainer>
</document>
================================================
FILE: TabBarDemo/TabBarDemo/Base.lproj/Main_iPhone.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4510" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="6kb-xr-qZa">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3742"/>
</dependencies>
<scenes>
<!--View Controller - Item 1-->
<scene sceneID="9VI-vG-8Kg">
<objects>
<viewController id="Hsq-g1-dma" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="oTJ-bG-fZW">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view alpha="0.59999999999999998" contentMode="scaleToFill" id="Qtj-8G-hhH">
<rect key="frame" x="20" y="20" width="280" height="472"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="zui-vk-apM">
<rect key="frame" x="20" y="20" width="280" height="472"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<mutableString key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.
Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation .</mutableString>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
</subviews>
<color key="backgroundColor" red="0.098272695980000005" green="1" blue="0.082673679589999993" alpha="1" colorSpace="calibratedRGB"/>
</view>
<tabBarItem key="tabBarItem" title="Item 1" id="dN4-tK-Kqe"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="gum-f6-WxE" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-29" y="-434"/>
</scene>
<!--Tab Bar View Controller-->
<scene sceneID="geY-Kb-z6y">
<objects>
<tabBarController definesPresentationContext="YES" id="6kb-xr-qZa" customClass="TabBarViewController" sceneMemberID="viewController">
<nil key="simulatedBottomBarMetrics"/>
<tabBar key="tabBar" contentMode="scaleToFill" id="V0A-Sw-s6s">
<rect key="frame" x="129" y="330" width="163" height="49"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
</tabBar>
<connections>
<segue destination="Hsq-g1-dma" kind="relationship" relationship="viewControllers" id="qWu-cX-sEq"/>
<segue destination="bRO-k6-eZk" kind="relationship" relationship="viewControllers" id="klS-z2-jJY"/>
<segue destination="fES-VD-xXB" kind="relationship" relationship="viewControllers" id="VOH-9J-6o9"/>
</connections>
</tabBarController>
<placeholder placeholderIdentifier="IBFirstResponder" id="yY6-J3-Pid" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-571" y="405"/>
</scene>
<!--View Controller - Item 2-->
<scene sceneID="Xz0-FP-6cF">
<objects>
<viewController id="bRO-k6-eZk" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="zF7-yI-pQT">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view alpha="0.60000002384185791" contentMode="scaleToFill" id="74T-ps-02X">
<rect key="frame" x="20" y="20" width="280" height="472"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="mMF-qI-3ZM">
<rect key="frame" x="20" y="20" width="280" height="472"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<mutableString key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.
Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation .</mutableString>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
</subviews>
<color key="backgroundColor" red="1" green="0.018977788870000002" blue="0.040716178679999999" alpha="1" colorSpace="calibratedRGB"/>
</view>
<tabBarItem key="tabBarItem" title="Item 2" id="bex-zd-Ce4"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="PYr-Hp-OPZ" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="11" y="411"/>
</scene>
<!--View Controller - Item 3-->
<scene sceneID="nP6-l0-ZF2">
<objects>
<viewController id="fES-VD-xXB" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="gID-bm-ZHa">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view alpha="0.60000002384185791" contentMode="scaleToFill" id="SPP-m3-ti0">
<rect key="frame" x="20" y="20" width="280" height="472"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" id="7f7-eb-fnJ">
<rect key="frame" x="20" y="20" width="280" height="472"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<mutableString key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.
Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation .</mutableString>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
</subviews>
<color key="backgroundColor" red="1" green="0.5" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
</view>
<tabBarItem key="tabBarItem" title="Item 3" id="OYX-34-W8p"/>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Z5b-iG-OdP" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="36" y="1193"/>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
</document>
================================================
FILE: TabBarDemo/TabBarDemo/Images.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: TabBarDemo/TabBarDemo/Images.xcassets/LaunchImage.launchimage/Contents.json
================================================
{
"images" : [
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"subtype" : "retina4",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: TabBarDemo/TabBarDemo/TabBarDemo-Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.scottlogic.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIMainStoryboardFile</key>
<string>Main_iPhone</string>
<key>UIMainStoryboardFile~ipad</key>
<string>Main_iPad</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
================================================
FILE: TabBarDemo/TabBarDemo/TabBarDemo-Prefix.pch
================================================
//
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//
#import <Availability.h>
#ifndef __IPHONE_5_0
#warning "This project uses features only available in iOS SDK 5.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
================================================
FILE: TabBarDemo/TabBarDemo/TabBarViewController.h
================================================
//
// TabBarViewController.h
// TabBarDemo
//
// Created by Colin Eberhardt on 18/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface TabBarViewController : UITabBarController
@end
================================================
FILE: TabBarDemo/TabBarDemo/TabBarViewController.m
================================================
//
// TabBarViewController.m
// TabBarDemo
//
// Created by Colin Eberhardt on 18/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "TabBarViewController.h"
#import "CEFoldAnimationController.h"
#import "CEHorizontalSwipeInteractionController.h"
@interface TabBarViewController () <UITabBarControllerDelegate>
@end
@implementation TabBarViewController {
CEFoldAnimationController *_animationController;
CEHorizontalSwipeInteractionController *_swipeInteractionController;
}
- (id)initWithCoder:(NSCoder *)aDecoder {
if (self = [super initWithCoder:aDecoder]) {
self.delegate = self;
// create the interaction / animation controllers
_swipeInteractionController = [CEHorizontalSwipeInteractionController new];
_animationController = [CEFoldAnimationController new];
_animationController.folds = 3;
// observe changes in the currently presented view controller
[self addObserver:self
forKeyPath:@"selectedViewController"
options:NSKeyValueObservingOptionNew
context:nil];
}
return self;
}
- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object
change:(NSDictionary *)change
context:(void *)context
{
if ([keyPath isEqualToString:@"selectedViewController"] )
{
// wire the interaction controller to the view controller
[_swipeInteractionController wireToViewController:self.selectedViewController
forOperation:CEInteractionOperationTab];
}
}
- (id <UIViewControllerAnimatedTransitioning>)tabBarController:(UITabBarController *)tabBarController
animationControllerForTransitionFromViewController:(UIViewController *)fromVC
toViewController:(UIViewController *)toVC {
NSUInteger fromVCIndex = [tabBarController.viewControllers indexOfObject:fromVC];
NSUInteger toVCIndex = [tabBarController.viewControllers indexOfObject:toVC];
_animationController.reverse = fromVCIndex < toVCIndex;
return _animationController;
}
-(id<UIViewControllerInteractiveTransitioning>)tabBarController:(UITabBarController *)tabBarController interactionControllerForAnimationController:(id<UIViewControllerAnimatedTransitioning>)animationController
{
return _swipeInteractionController.interactionInProgress ? _swipeInteractionController : nil;
}
@end
================================================
FILE: TabBarDemo/TabBarDemo/ViewController.h
================================================
//
// ViewController.h
// TabBarDemo
//
// Created by Colin Eberhardt on 17/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@end
================================================
FILE: TabBarDemo/TabBarDemo/ViewController.m
================================================
//
// ViewController.m
// TabBarDemo
//
// Created by Colin Eberhardt on 17/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
@end
================================================
FILE: TabBarDemo/TabBarDemo/en.lproj/InfoPlist.strings
================================================
/* Localized versions of Info.plist keys */
================================================
FILE: TabBarDemo/TabBarDemo/main.m
================================================
//
// main.m
// TabBarDemo
//
// Created by Colin Eberhardt on 17/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
================================================
FILE: TabBarDemo/TabBarDemo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
72EC05B717E8DF3D00DCB9A3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72EC05B617E8DF3D00DCB9A3 /* Foundation.framework */; };
72EC05B917E8DF3D00DCB9A3 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72EC05B817E8DF3D00DCB9A3 /* CoreGraphics.framework */; };
72EC05BB17E8DF3D00DCB9A3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72EC05BA17E8DF3D00DCB9A3 /* UIKit.framework */; };
72EC05C117E8DF3D00DCB9A3 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 72EC05BF17E8DF3D00DCB9A3 /* InfoPlist.strings */; };
72EC05C317E8DF3D00DCB9A3 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EC05C217E8DF3D00DCB9A3 /* main.m */; };
72EC05C717E8DF3D00DCB9A3 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EC05C617E8DF3D00DCB9A3 /* AppDelegate.m */; };
72EC05CA17E8DF3D00DCB9A3 /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 72EC05C817E8DF3D00DCB9A3 /* Main_iPhone.storyboard */; };
72EC05CD17E8DF3D00DCB9A3 /* Main_iPad.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 72EC05CB17E8DF3D00DCB9A3 /* Main_iPad.storyboard */; };
72EC05D017E8DF3D00DCB9A3 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EC05CF17E8DF3D00DCB9A3 /* ViewController.m */; };
72EC05D217E8DF3D00DCB9A3 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 72EC05D117E8DF3D00DCB9A3 /* Images.xcassets */; };
72EC05D917E8DF3D00DCB9A3 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72EC05D817E8DF3D00DCB9A3 /* XCTest.framework */; };
72EC05DA17E8DF3D00DCB9A3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72EC05B617E8DF3D00DCB9A3 /* Foundation.framework */; };
72EC05DB17E8DF3D00DCB9A3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 72EC05BA17E8DF3D00DCB9A3 /* UIKit.framework */; };
72EC05E317E8DF3D00DCB9A3 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 72EC05E117E8DF3D00DCB9A3 /* InfoPlist.strings */; };
72EC05E517E8DF3D00DCB9A3 /* TabBarDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EC05E417E8DF3D00DCB9A3 /* TabBarDemoTests.m */; };
72EC05FB17E8DF5D00DCB9A3 /* CECrossfadeAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EC05F517E8DF5D00DCB9A3 /* CECrossfadeAnimationController.m */; };
72EC05FC17E8DF5D00DCB9A3 /* CEExplodeAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EC05F617E8DF5D00DCB9A3 /* CEExplodeAnimationController.m */; };
72EC05FD17E8DF5D00DCB9A3 /* CEFlipAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EC05F717E8DF5D00DCB9A3 /* CEFlipAnimationController.m */; };
72EC05FE17E8DF5D00DCB9A3 /* CEFoldAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EC05F817E8DF5D00DCB9A3 /* CEFoldAnimationController.m */; };
72EC05FF17E8DF5D00DCB9A3 /* CEReversibleAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EC05F917E8DF5D00DCB9A3 /* CEReversibleAnimationController.m */; };
72EC060017E8DF5D00DCB9A3 /* CETurnAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EC05FA17E8DF5D00DCB9A3 /* CETurnAnimationController.m */; };
72EC060317E9655300DCB9A3 /* TabBarViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EC060217E9655300DCB9A3 /* TabBarViewController.m */; };
72EC060917E96C2500DCB9A3 /* CEBaseInteractionController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EC060717E96C2500DCB9A3 /* CEBaseInteractionController.m */; };
72EE96DE17EF6A5D0097DF82 /* CEHorizontalSwipeInteractionController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EE96DD17EF6A5D0097DF82 /* CEHorizontalSwipeInteractionController.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
72EC05DC17E8DF3D00DCB9A3 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 72EC05AB17E8DF3D00DCB9A3 /* Project object */;
proxyType = 1;
remoteGlobalIDString = 72EC05B217E8DF3D00DCB9A3;
remoteInfo = TabBarDemo;
};
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
72EC05B317E8DF3D00DCB9A3 /* TabBarDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TabBarDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
72EC05B617E8DF3D00DCB9A3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
72EC05B817E8DF3D00DCB9A3 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
72EC05BA17E8DF3D00DCB9A3 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
72EC05BE17E8DF3D00DCB9A3 /* TabBarDemo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TabBarDemo-Info.plist"; sourceTree = "<group>"; };
72EC05C017E8DF3D00DCB9A3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
72EC05C217E8DF3D00DCB9A3 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
72EC05C417E8DF3D00DCB9A3 /* TabBarDemo-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TabBarDemo-Prefix.pch"; sourceTree = "<group>"; };
72EC05C517E8DF3D00DCB9A3 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
72EC05C617E8DF3D00DCB9A3 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
72EC05C917E8DF3D00DCB9A3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPhone.storyboard; sourceTree = "<group>"; };
72EC05CC17E8DF3D00DCB9A3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPad.storyboard; sourceTree = "<group>"; };
72EC05CE17E8DF3D00DCB9A3 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
72EC05CF17E8DF3D00DCB9A3 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
72EC05D117E8DF3D00DCB9A3 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
72EC05D717E8DF3D00DCB9A3 /* TabBarDemoTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = TabBarDemoTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
72EC05D817E8DF3D00DCB9A3 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
72EC05E017E8DF3D00DCB9A3 /* TabBarDemoTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TabBarDemoTests-Info.plist"; sourceTree = "<group>"; };
72EC05E217E8DF3D00DCB9A3 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
72EC05E417E8DF3D00DCB9A3 /* TabBarDemoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TabBarDemoTests.m; sourceTree = "<group>"; };
72EC05EF17E8DF5D00DCB9A3 /* CECrossfadeAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CECrossfadeAnimationController.h; path = ../AnimationControllers/CECrossfadeAnimationController.h; sourceTree = "<group>"; };
72EC05F017E8DF5D00DCB9A3 /* CEExplodeAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CEExplodeAnimationController.h; path = ../AnimationControllers/CEExplodeAnimationController.h; sourceTree = "<group>"; };
72EC05F117E8DF5D00DCB9A3 /* CEFlipAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CEFlipAnimationController.h; path = ../AnimationControllers/CEFlipAnimationController.h; sourceTree = "<group>"; };
72EC05F217E8DF5D00DCB9A3 /* CEFoldAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CEFoldAnimationController.h; path = ../AnimationControllers/CEFoldAnimationController.h; sourceTree = "<group>"; };
72EC05F317E8DF5D00DCB9A3 /* CEReversibleAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CEReversibleAnimationController.h; path = ../AnimationControllers/CEReversibleAnimationController.h; sourceTree = "<group>"; };
72EC05F417E8DF5D00DCB9A3 /* CETurnAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CETurnAnimationController.h; path = ../AnimationControllers/CETurnAnimationController.h; sourceTree = "<group>"; };
72EC05F517E8DF5D00DCB9A3 /* CECrossfadeAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CECrossfadeAnimationController.m; path = ../AnimationControllers/CECrossfadeAnimationController.m; sourceTree = "<group>"; };
72EC05F617E8DF5D00DCB9A3 /* CEExplodeAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CEExplodeAnimationController.m; path = ../AnimationControllers/CEExplodeAnimationController.m; sourceTree = "<group>"; };
72EC05F717E8DF5D00DCB9A3 /* CEFlipAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CEFlipAnimationController.m; path = ../AnimationControllers/CEFlipAnimationController.m; sourceTree = "<group>"; };
72EC05F817E8DF5D00DCB9A3 /* CEFoldAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CEFoldAnimationController.m; path = ../AnimationControllers/CEFoldAnimationController.m; sourceTree = "<group>"; };
72EC05F917E8DF5D00DCB9A3 /* CEReversibleAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CEReversibleAnimationController.m; path = ../AnimationControllers/CEReversibleAnimationController.m; sourceTree = "<group>"; };
72EC05FA17E8DF5D00DCB9A3 /* CETurnAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CETurnAnimationController.m; path = ../AnimationControllers/CETurnAnimationController.m; sourceTree = "<group>"; };
72EC060117E9655300DCB9A3 /* TabBarViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TabBarViewController.h; sourceTree = "<group>"; };
72EC060217E9655300DCB9A3 /* TabBarViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TabBarViewController.m; sourceTree = "<group>"; };
72EC060517E96C2500DCB9A3 /* CEBaseInteractionController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CEBaseInteractionController.h; path = ../InteractionControllers/CEBaseInteractionController.h; sourceTree = "<group>"; };
72EC060717E96C2500DCB9A3 /* CEBaseInteractionController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CEBaseInteractionController.m; path = ../InteractionControllers/CEBaseInteractionController.m; sourceTree = "<group>"; };
72EE96DC17EF6A5D0097DF82 /* CEHorizontalSwipeInteractionController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CEHorizontalSwipeInteractionController.h; path = ../InteractionControllers/CEHorizontalSwipeInteractionController.h; sourceTree = "<group>"; };
72EE96DD17EF6A5D0097DF82 /* CEHorizontalSwipeInteractionController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CEHorizontalSwipeInteractionController.m; path = ../InteractionControllers/CEHorizontalSwipeInteractionController.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
72EC05B017E8DF3D00DCB9A3 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
72EC05B917E8DF3D00DCB9A3 /* CoreGraphics.framework in Frameworks */,
72EC05BB17E8DF3D00DCB9A3 /* UIKit.framework in Frameworks */,
72EC05B717E8DF3D00DCB9A3 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
72EC05D417E8DF3D00DCB9A3 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
72EC05D917E8DF3D00DCB9A3 /* XCTest.framework in Frameworks */,
72EC05DB17E8DF3D00DCB9A3 /* UIKit.framework in Frameworks */,
72EC05DA17E8DF3D00DCB9A3 /* Foundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
72EC05AA17E8DF3D00DCB9A3 = {
isa = PBXGroup;
children = (
72EC060417E96C0C00DCB9A3 /* InteractionControllers */,
72EC05EE17E8DF4A00DCB9A3 /* AnimationControllers */,
72EC05BC17E8DF3D00DCB9A3 /* TabBarDemo */,
72EC05DE17E8DF3D00DCB9A3 /* TabBarDemoTests */,
72EC05B517E8DF3D00DCB9A3 /* Frameworks */,
72EC05B417E8DF3D00DCB9A3 /* Products */,
);
sourceTree = "<group>";
};
72EC05B417E8DF3D00DCB9A3 /* Products */ = {
isa = PBXGroup;
children = (
72EC05B317E8DF3D00DCB9A3 /* TabBarDemo.app */,
72EC05D717E8DF3D00DCB9A3 /* TabBarDemoTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
72EC05B517E8DF3D00DCB9A3 /* Frameworks */ = {
isa = PBXGroup;
children = (
72EC05B617E8DF3D00DCB9A3 /* Foundation.framework */,
72EC05B817E8DF3D00DCB9A3 /* CoreGraphics.framework */,
72EC05BA17E8DF3D00DCB9A3 /* UIKit.framework */,
72EC05D817E8DF3D00DCB9A3 /* XCTest.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
72EC05BC17E8DF3D00DCB9A3 /* TabBarDemo */ = {
isa = PBXGroup;
children = (
72EC05C517E8DF3D00DCB9A3 /* AppDelegate.h */,
72EC05C617E8DF3D00DCB9A3 /* AppDelegate.m */,
72EC05C817E8DF3D00DCB9A3 /* Main_iPhone.storyboard */,
72EC05CB17E8DF3D00DCB9A3 /* Main_iPad.storyboard */,
72EC05CE17E8DF3D00DCB9A3 /* ViewController.h */,
72EC05CF17E8DF3D00DCB9A3 /* ViewController.m */,
72EC05D117E8DF3D00DCB9A3 /* Images.xcassets */,
72EC05BD17E8DF3D00DCB9A3 /* Supporting Files */,
72EC060117E9655300DCB9A3 /* TabBarViewController.h */,
72EC060217E9655300DCB9A3 /* TabBarViewController.m */,
);
path = TabBarDemo;
sourceTree = "<group>";
};
72EC05BD17E8DF3D00DCB9A3 /* Supporting Files */ = {
isa = PBXGroup;
children = (
72EC05BE17E8DF3D00DCB9A3 /* TabBarDemo-Info.plist */,
72EC05BF17E8DF3D00DCB9A3 /* InfoPlist.strings */,
72EC05C217E8DF3D00DCB9A3 /* main.m */,
72EC05C417E8DF3D00DCB9A3 /* TabBarDemo-Prefix.pch */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
72EC05DE17E8DF3D00DCB9A3 /* TabBarDemoTests */ = {
isa = PBXGroup;
children = (
72EC05E417E8DF3D00DCB9A3 /* TabBarDemoTests.m */,
72EC05DF17E8DF3D00DCB9A3 /* Supporting Files */,
);
path = TabBarDemoTests;
sourceTree = "<group>";
};
72EC05DF17E8DF3D00DCB9A3 /* Supporting Files */ = {
isa = PBXGroup;
children = (
72EC05E017E8DF3D00DCB9A3 /* TabBarDemoTests-Info.plist */,
72EC05E117E8DF3D00DCB9A3 /* InfoPlist.strings */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
72EC05EE17E8DF4A00DCB9A3 /* AnimationControllers */ = {
isa = PBXGroup;
children = (
72EC05EF17E8DF5D00DCB9A3 /* CECrossfadeAnimationController.h */,
72EC05F517E8DF5D00DCB9A3 /* CECrossfadeAnimationController.m */,
72EC05F017E8DF5D00DCB9A3 /* CEExplodeAnimationController.h */,
72EC05F617E8DF5D00DCB9A3 /* CEExplodeAnimationController.m */,
72EC05F117E8DF5D00DCB9A3 /* CEFlipAnimationController.h */,
72EC05F717E8DF5D00DCB9A3 /* CEFlipAnimationController.m */,
72EC05F217E8DF5D00DCB9A3 /* CEFoldAnimationController.h */,
72EC05F817E8DF5D00DCB9A3 /* CEFoldAnimationController.m */,
72EC05F317E8DF5D00DCB9A3 /* CEReversibleAnimationController.h */,
72EC05F917E8DF5D00DCB9A3 /* CEReversibleAnimationController.m */,
72EC05F417E8DF5D00DCB9A3 /* CETurnAnimationController.h */,
72EC05FA17E8DF5D00DCB9A3 /* CETurnAnimationController.m */,
);
name = AnimationControllers;
sourceTree = "<group>";
};
72EC060417E96C0C00DCB9A3 /* InteractionControllers */ = {
isa = PBXGroup;
children = (
72EE96DC17EF6A5D0097DF82 /* CEHorizontalSwipeInteractionController.h */,
72EE96DD17EF6A5D0097DF82 /* CEHorizontalSwipeInteractionController.m */,
72EC060517E96C2500DCB9A3 /* CEBaseInteractionController.h */,
72EC060717E96C2500DCB9A3 /* CEBaseInteractionController.m */,
);
name = InteractionControllers;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
72EC05B217E8DF3D00DCB9A3 /* TabBarDemo */ = {
isa = PBXNativeTarget;
buildConfigurationList = 72EC05E817E8DF3D00DCB9A3 /* Build configuration list for PBXNativeTarget "TabBarDemo" */;
buildPhases = (
72EC05AF17E8DF3D00DCB9A3 /* Sources */,
72EC05B017E8DF3D00DCB9A3 /* Frameworks */,
72EC05B117E8DF3D00DCB9A3 /* Resources */,
);
buildRules = (
);
dependencies = (
);
name = TabBarDemo;
productName = TabBarDemo;
productReference = 72EC05B317E8DF3D00DCB9A3 /* TabBarDemo.app */;
productType = "com.apple.product-type.application";
};
72EC05D617E8DF3D00DCB9A3 /* TabBarDemoTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 72EC05EB17E8DF3D00DCB9A3 /* Build configuration list for PBXNativeTarget "TabBarDemoTests" */;
buildPhases = (
72EC05D317E8DF3D00DCB9A3 /* Sources */,
72EC05D417E8DF3D00DCB9A3 /* Frameworks */,
72EC05D517E8DF3D00DCB9A3 /* Resources */,
);
buildRules = (
);
dependencies = (
72EC05DD17E8DF3D00DCB9A3 /* PBXTargetDependency */,
);
name = TabBarDemoTests;
productName = TabBarDemoTests;
productReference = 72EC05D717E8DF3D00DCB9A3 /* TabBarDemoTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
72EC05AB17E8DF3D00DCB9A3 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
ORGANIZATIONNAME = "Colin Eberhardt";
TargetAttributes = {
72EC05D617E8DF3D00DCB9A3 = {
TestTargetID = 72EC05B217E8DF3D00DCB9A3;
};
};
};
buildConfigurationList = 72EC05AE17E8DF3D00DCB9A3 /* Build configuration list for PBXProject "TabBarDemo" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 72EC05AA17E8DF3D00DCB9A3;
productRefGroup = 72EC05B417E8DF3D00DCB9A3 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
72EC05B217E8DF3D00DCB9A3 /* TabBarDemo */,
72EC05D617E8DF3D00DCB9A3 /* TabBarDemoTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
72EC05B117E8DF3D00DCB9A3 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
72EC05CD17E8DF3D00DCB9A3 /* Main_iPad.storyboard in Resources */,
72EC05D217E8DF3D00DCB9A3 /* Images.xcassets in Resources */,
72EC05CA17E8DF3D00DCB9A3 /* Main_iPhone.storyboard in Resources */,
72EC05C117E8DF3D00DCB9A3 /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
72EC05D517E8DF3D00DCB9A3 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
72EC05E317E8DF3D00DCB9A3 /* InfoPlist.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
72EC05AF17E8DF3D00DCB9A3 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
72EC060317E9655300DCB9A3 /* TabBarViewController.m in Sources */,
72EE96DE17EF6A5D0097DF82 /* CEHorizontalSwipeInteractionController.m in Sources */,
72EC05D017E8DF3D00DCB9A3 /* ViewController.m in Sources */,
72EC05FF17E8DF5D00DCB9A3 /* CEReversibleAnimationController.m in Sources */,
72EC05C717E8DF3D00DCB9A3 /* AppDelegate.m in Sources */,
72EC060017E8DF5D00DCB9A3 /* CETurnAnimationController.m in Sources */,
72EC05FB17E8DF5D00DCB9A3 /* CECrossfadeAnimationController.m in Sources */,
72EC05FC17E8DF5D00DCB9A3 /* CEExplodeAnimationController.m in Sources */,
72EC05C317E8DF3D00DCB9A3 /* main.m in Sources */,
72EC060917E96C2500DCB9A3 /* CEBaseInteractionController.m in Sources */,
72EC05FE17E8DF5D00DCB9A3 /* CEFoldAnimationController.m in Sources */,
72EC05FD17E8DF5D00DCB9A3 /* CEFlipAnimationController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
72EC05D317E8DF3D00DCB9A3 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
72EC05E517E8DF3D00DCB9A3 /* TabBarDemoTests.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
72EC05DD17E8DF3D00DCB9A3 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = 72EC05B217E8DF3D00DCB9A3 /* TabBarDemo */;
targetProxy = 72EC05DC17E8DF3D00DCB9A3 /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
72EC05BF17E8DF3D00DCB9A3 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
72EC05C017E8DF3D00DCB9A3 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
72EC05C817E8DF3D00DCB9A3 /* Main_iPhone.storyboard */ = {
isa = PBXVariantGroup;
children = (
72EC05C917E8DF3D00DCB9A3 /* Base */,
);
name = Main_iPhone.storyboard;
sourceTree = "<group>";
};
72EC05CB17E8DF3D00DCB9A3 /* Main_iPad.storyboard */ = {
isa = PBXVariantGroup;
children = (
72EC05CC17E8DF3D00DCB9A3 /* Base */,
);
name = Main_iPad.storyboard;
sourceTree = "<group>";
};
72EC05E117E8DF3D00DCB9A3 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
72EC05E217E8DF3D00DCB9A3 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
72EC05E617E8DF3D00DCB9A3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
};
72EC05E717E8DF3D00DCB9A3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = YES;
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
SDKROOT = iphoneos;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
};
name = Release;
};
72EC05E917E8DF3D00DCB9A3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "TabBarDemo/TabBarDemo-Prefix.pch";
INFOPLIST_FILE = "TabBarDemo/TabBarDemo-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Debug;
};
72EC05EA17E8DF3D00DCB9A3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "TabBarDemo/TabBarDemo-Prefix.pch";
INFOPLIST_FILE = "TabBarDemo/TabBarDemo-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
WRAPPER_EXTENSION = app;
};
name = Release;
};
72EC05EC17E8DF3D00DCB9A3 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TabBarDemo.app/TabBarDemo";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "TabBarDemo/TabBarDemo-Prefix.pch";
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
INFOPLIST_FILE = "TabBarDemoTests/TabBarDemoTests-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
};
name = Debug;
};
72EC05ED17E8DF3D00DCB9A3 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TabBarDemo.app/TabBarDemo";
FRAMEWORK_SEARCH_PATHS = (
"$(SDKROOT)/Developer/Library/Frameworks",
"$(inherited)",
"$(DEVELOPER_FRAMEWORKS_DIR)",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "TabBarDemo/TabBarDemo-Prefix.pch";
INFOPLIST_FILE = "TabBarDemoTests/TabBarDemoTests-Info.plist";
PRODUCT_NAME = "$(TARGET_NAME)";
TEST_HOST = "$(BUNDLE_LOADER)";
WRAPPER_EXTENSION = xctest;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
72EC05AE17E8DF3D00DCB9A3 /* Build configuration list for PBXProject "TabBarDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
72EC05E617E8DF3D00DCB9A3 /* Debug */,
72EC05E717E8DF3D00DCB9A3 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
72EC05E817E8DF3D00DCB9A3 /* Build configuration list for PBXNativeTarget "TabBarDemo" */ = {
isa = XCConfigurationList;
buildConfigurations = (
72EC05E917E8DF3D00DCB9A3 /* Debug */,
72EC05EA17E8DF3D00DCB9A3 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
72EC05EB17E8DF3D00DCB9A3 /* Build configuration list for PBXNativeTarget "TabBarDemoTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
72EC05EC17E8DF3D00DCB9A3 /* Debug */,
72EC05ED17E8DF3D00DCB9A3 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 72EC05AB17E8DF3D00DCB9A3 /* Project object */;
}
================================================
FILE: TabBarDemo/TabBarDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata
================================================
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:TabBarDemo.xcodeproj">
</FileRef>
</Workspace>
================================================
FILE: TabBarDemo/TabBarDemo.xcodeproj/project.xcworkspace/xcshareddata/TabBarDemo.xccheckout
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>1E84E93D-E2FA-4FCE-803F-2A2971E98742</string>
<key>IDESourceControlProjectName</key>
<string>TabBarDemo</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>C9B960E113CD2F1E13B17A07CE56CB3BD674F912</key>
<string>https://github.com/cyndibaby905/VCTransitionsLibrary.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>TabBarDemo/TabBarDemo.xcodeproj</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>C9B960E113CD2F1E13B17A07CE56CB3BD674F912</key>
<string>../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/cyndibaby905/VCTransitionsLibrary.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>111</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>C9B960E113CD2F1E13B17A07CE56CB3BD674F912</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>C9B960E113CD2F1E13B17A07CE56CB3BD674F912</string>
<key>IDESourceControlWCCName</key>
<string>VCTransitionsLibrary</string>
</dict>
</array>
</dict>
</plist>
================================================
FILE: TabBarDemo/TabBarDemoTests/TabBarDemoTests-Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.scottlogic.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
================================================
FILE: TabBarDemo/TabBarDemoTests/TabBarDemoTests.m
================================================
//
// TabBarDemoTests.m
// TabBarDemoTests
//
// Created by Colin Eberhardt on 17/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import <XCTest/XCTest.h>
@interface TabBarDemoTests : XCTestCase
@end
@implementation TabBarDemoTests
- (void)setUp
{
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
}
- (void)tearDown
{
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}
- (void)testExample
{
XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__);
}
@end
================================================
FILE: TabBarDemo/TabBarDemoTests/en.lproj/InfoPlist.strings
================================================
/* Localized versions of Info.plist keys */
================================================
FILE: TransitionsDemo/TransitionsDemo/AppDelegate.h
================================================
//
// AppDelegate.h
// TransitionsDemo
//
// Created by Colin Eberhardt on 10/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import <UIKit/UIKit.h>
// a macro for easy access to the singleton app-delegate. Yes, I know some people
// consider the an anti-pattern, but this is just a simple test app, so let's
// not stress about it? ;-)
#define AppDelegateAccessor ((AppDelegate *)[[UIApplication sharedApplication] delegate])
@class CEReversibleAnimationController, CEBaseInteractionController;
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) CEReversibleAnimationController *settingsAnimationController;
@property (strong, nonatomic) CEReversibleAnimationController *navigationControllerAnimationController;
@property (strong, nonatomic) CEBaseInteractionController *navigationControllerInteractionController;
@property (strong, nonatomic) CEBaseInteractionController *settingsInteractionController;
@end
================================================
FILE: TransitionsDemo/TransitionsDemo/AppDelegate.m
================================================
//
// AppDelegate.m
// TransitionsDemo
//
// Created by Colin Eberhardt on 10/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "AppDelegate.h"
#import "CECardsAnimationController.h"
#import "CEVerticalSwipeInteractionController.h"
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
//AppDelegateAccessor.navigationControllerAnimationController = [CECardsAnimationController new];
//AppDelegateAccessor.navigationControllerInteractionController = [CEVerticalSwipeInteactionController new];
return YES;
}
@end
================================================
FILE: TransitionsDemo/TransitionsDemo/Base.lproj/Launch Screen.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8164.2" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8135.1"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>
================================================
FILE: TransitionsDemo/TransitionsDemo/Base.lproj/Main_iPhone.storyboard
================================================
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="4510" systemVersion="12E55" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="Vwk-6U-LXd">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3742"/>
</dependencies>
<scenes>
<!--Navigation Controller-->
<scene sceneID="gwt-Vs-FTI">
<objects>
<navigationController definesPresentationContext="YES" id="Vwk-6U-LXd" customClass="NavigationController" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="R7t-Hc-ZXp">
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="8eK-ED-7Al" kind="relationship" relationship="rootViewController" id="d91-WC-R0R"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="PGb-8e-L5W" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="-214" y="-107"/>
</scene>
<!--View Controller - MyView-->
<scene sceneID="GTo-vm-bZl">
<objects>
<viewController id="8eK-ED-7Al" customClass="ViewController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="Nuo-ub-F7U">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<view alpha="0.65000000000000013" contentMode="scaleToFill" id="0Dq-OP-B7C">
<rect key="frame" x="20" y="82" width="280" height="428"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" userInteractionEnabled="NO" contentMode="scaleToFill" id="j9n-2T-EF3">
<rect key="frame" x="20" y="82" width="280" height="428"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<accessibility key="accessibilityConfiguration">
<accessibilityTraits key="traits" none="YES" notEnabled="YES"/>
</accessibility>
<string key="text">Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.
Lorem ipsum dolor sit er elit lamet, consectetaur cillium adipisicing pecu, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Nam liber te conscient to factor tum poen legum odioque civiuda.</string>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
</textView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" id="dl4-O8-EsA">
<rect key="frame" x="254" y="518" width="46" height="30"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMinY="YES"/>
<state key="normal" title="Next">
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
</state>
<connections>
<segue destination="8eK-ED-7Al" kind="push" id="cqb-gg-qYl"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
<navigationItem key="navigationItem" title="MyView" id="Dnh-wc-MG1">
<barButtonItem key="rightBarButtonItem" title="Settings" id="uCX-xc-klL">
<connections>
<segue destination="4TF-hz-OQ8" kind="modal" identifier="ShowSettings" id="ixC-z2-ySi"/>
</connections>
</barButtonItem>
</navigationItem>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="0B6-2O-8G9" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="281" y="-107"/>
</scene>
<!--Navigation Controller-->
<scene sceneID="uxG-dZ-NkL">
<objects>
<navigationController definesPresentationContext="YES" id="4TF-hz-OQ8" sceneMemberID="viewController">
<navigationBar key="navigationBar" contentMode="scaleToFill" id="C2p-rQ-yHt">
<autoresizingMask key="autoresizingMask"/>
</navigationBar>
<connections>
<segue destination="3L2-TG-g4W" kind="relationship" relationship="rootViewController" id="Vmg-GM-BPP"/>
</connections>
</navigationController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Md2-ea-rsV" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="865" y="-557"/>
</scene>
<!--Settings View Controller - Settings-->
<scene sceneID="Q05-Ja-hNK">
<objects>
<tableViewController id="3L2-TG-g4W" customClass="SettingsViewController" sceneMemberID="viewController">
<tableView key="view" opaque="NO" clipsSubviews="YES" clearsContextBeforeDrawing="NO" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="pRK-4t-se4">
<rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<prototypes>
<tableViewCell contentMode="scaleToFill" selectionStyle="blue" hidesAccessoryWhenEditing="NO" indentationLevel="1" indentationWidth="0.0" reuseIdentifier="cell" textLabel="sPi-6n-HgQ" style="IBUITableViewCellStyleDefault" id="xmg-AA-Ume">
<rect key="frame" x="0.0" y="86" width="320" height="44"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="xmg-AA-Ume" id="cEf-2q-fH4">
<rect key="frame" x="0.0" y="0.0" width="320" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="left" text="Title" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" id="sPi-6n-HgQ">
<rect key="frame" x="15" y="0.0" width="290" height="43"/>
<autoresizingMask key="autoresizingMask"/>
<fontDescription key="fontDescription" type="system" pointSize="18"/>
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="3L2-TG-g4W" id="g9F-M3-39Z"/>
<outlet property="delegate" destination="3L2-TG-g4W" id="24N-Q1-3ZK"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Settings" id="rex-sy-t4i">
<barButtonItem key="rightBarButtonItem" title="Done" id="FmW-d9-xoB">
<connections>
<action selector="doneButtonPressed:" destination="3L2-TG-g4W" id="2A1-I4-46a"/>
</connections>
</barButtonItem>
</navigationItem>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="GPi-bE-k3x" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1333" y="-557"/>
</scene>
</scenes>
<simulatedMetricsContainer key="defaultSimulatedMetrics">
<simulatedStatusBarMetrics key="statusBar"/>
<simulatedOrientationMetrics key="orientation"/>
<simulatedScreenMetrics key="destination" type="retina4"/>
</simulatedMetricsContainer>
<inferredMetricsTieBreakers>
<segue reference="d91-WC-R0R"/>
</inferredMetricsTieBreakers>
</document>
================================================
FILE: TransitionsDemo/TransitionsDemo/Images.xcassets/AppIcon.appiconset/Contents.json
================================================
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: TransitionsDemo/TransitionsDemo/Images.xcassets/LaunchImage.launchimage/Contents.json
================================================
{
"images" : [
{
"orientation" : "portrait",
"idiom" : "iphone",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "iphone",
"subtype" : "retina4",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "1x"
},
{
"orientation" : "portrait",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
},
{
"orientation" : "landscape",
"idiom" : "ipad",
"extent" : "full-screen",
"minimum-system-version" : "7.0",
"scale" : "2x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
================================================
FILE: TransitionsDemo/TransitionsDemo/NavigationController.h
================================================
//
// NavigationControllerViewController.h
// TransitionsDemo
//
// Created by Colin Eberhardt on 10/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface NavigationController : UINavigationController
@end
================================================
FILE: TransitionsDemo/TransitionsDemo/NavigationController.m
================================================
//
// MyNavigationControllerViewController.m
// ViewControllerTransitions
//
// Created by Colin Eberhardt on 09/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "NavigationController.h"
#import "AppDelegate.h"
#import "CEBaseInteractionController.h"
#import "CEReversibleAnimationController.h"
@interface NavigationController () <UINavigationControllerDelegate>
@end
@implementation NavigationController
- (id)initWithCoder:(NSCoder *)aDecoder {
if (self = [super initWithCoder:aDecoder]) {
self.delegate = self;
}
return self;
}
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
[self wirePopInteractionControllerTo:viewController];
}
- (void)wirePopInteractionControllerTo:(UIViewController *)viewController
{
// when a push occurs, wire the interaction controller to the to- view controller
if (!AppDelegateAccessor.navigationControllerInteractionController) {
return;
}
[AppDelegateAccessor.navigationControllerInteractionController wireToViewController:viewController forOperation:CEInteractionOperationPop];
}
- (id<UIViewControllerAnimatedTransitioning>)navigationController:(UINavigationController *)navigationController animationControllerForOperation:(UINavigationControllerOperation)operation fromViewController:(UIViewController *)fromVC toViewController:(UIViewController *)toVC {
if (AppDelegateAccessor.navigationControllerAnimationController) {
AppDelegateAccessor.navigationControllerAnimationController.reverse = operation == UINavigationControllerOperationPop;
}
return AppDelegateAccessor.navigationControllerAnimationController;
}
- (id <UIViewControllerInteractiveTransitioning>)navigationController:(UINavigationController *)navigationController interactionControllerForAnimationController:(id <UIViewControllerAnimatedTransitioning>) animationController {
// if we have an interaction controller - and it is currently in progress, return it
return AppDelegateAccessor.navigationControllerInteractionController && AppDelegateAccessor.navigationControllerInteractionController.interactionInProgress ? AppDelegateAccessor.navigationControllerInteractionController : nil;
}
@end
================================================
FILE: TransitionsDemo/TransitionsDemo/SettingsViewController.h
================================================
//
// SettingsViewController.h
// TransitionsDemo
//
// Created by Colin Eberhardt on 10/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SettingsViewController : UITableViewController
@end
================================================
FILE: TransitionsDemo/TransitionsDemo/SettingsViewController.m
================================================
//
// SettingsViewController.m
// TransitionsDemo
//
// Created by Colin Eberhardt on 10/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "SettingsViewController.h"
#import "NavigationController.h"
#import "CEBaseInteractionController.h"
#import "AppDelegate.h"
#import "CEReversibleAnimationController.h"
@interface SettingsViewController () <UIViewControllerTransitioningDelegate>
@end
@implementation SettingsViewController {
NSArray *_animationControllers;
NSArray *_interactionControllers;
}
- (id)initWithCoder:(NSCoder *)aDecoder {
if (self = [super initWithCoder:aDecoder]) {
_animationControllers = @[@"None", @"Portal", @"Cards", @"Fold", @"Explode", @"Flip", @"Turn", @"Crossfade", @"NatGeo", @"Cube",@"Pan"];
_interactionControllers = @[@"None", @"HorizontalSwipe" ,@"VerticalSwipe", @"Pinch"];
}
return self;
}
- (IBAction)doneButtonPressed:(id)sender {
[self dismissViewControllerAnimated:YES completion:nil];
}
- (NSString *)classToTransitionName:(NSObject *)instance {
if (!instance)
return @"None";
NSString *animationClass = NSStringFromClass(instance.class);
NSMutableString *transitionName = [[NSMutableString alloc] initWithString:animationClass];
[transitionName replaceOccurrencesOfString:@"CE" withString:@"" options:NSCaseInsensitiveSearch range:NSMakeRange(0, transitionName.length)];
[transitionName replaceOccurrencesOfString:@"AnimationController" withString:@"" options:NSCaseInsensitiveSearch range:NSMakeRange(0, transitionName.length)];
[transitionName replaceOccurrencesOfString:@"InteractionController" withString:@"" options:NSCaseInsensitiveSearch range:NSMakeRange(0, transitionName.length)];
return transitionName;
}
- (id)transitionNameToInstance:(NSString *)transitionName {
NSString *className = [NSString stringWithFormat:@"CE%@AnimationController", transitionName];
return [[NSClassFromString(className) alloc] init];
}
#pragma mark - UITableViewDelegate methods
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section < 2) {
// an animation controller was selected
NSString* transitionName = _animationControllers[indexPath.row];
NSString *className = [NSString stringWithFormat:@"CE%@AnimationController", transitionName];
id transitionInstance = [[NSClassFromString(className) alloc] init];
if (indexPath.section == 0) {
AppDelegateAccessor.navigationControllerAnimationController = transitionInstance;
}
if (indexPath.section == 1) {
AppDelegateAccessor.settingsAnimationController = transitionInstance;
}
} else {
// an interaction cntroller was selected
NSString* transitionName = _interactionControllers[indexPath.row];
NSString *className = [NSString stringWithFormat:@"CE%@InteractionController", transitionName];
id transitionInstance = [[NSClassFromString(className) alloc] init];
if (indexPath.section == 2) {
AppDelegateAccessor.navigationControllerInteractionController = transitionInstance;
}
if (indexPath.section == 3) {
AppDelegateAccessor.settingsInteractionController = transitionInstance;
}
}
[self.tableView reloadData];
}
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
// get the cell text
NSString *transitionName = cell.textLabel.text;
NSObject *currentTransition;
// get the current animation / interaction controller
if (indexPath.section < 2) {
currentTransition = indexPath.section == 0 ?
AppDelegateAccessor.navigationControllerAnimationController :
AppDelegateAccessor.settingsAnimationController;
} else {
currentTransition = indexPath.section == 2 ?
AppDelegateAccessor.navigationControllerInteractionController :
AppDelegateAccessor.settingsInteractionController;
}
// if they match - render a tick
NSString *transitionClassName = [self classToTransitionName:currentTransition];
cell.accessoryType = [transitionName isEqualToString:transitionClassName] ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
}
#pragma mark - UITableViewDatasource methods
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
if (indexPath.section < 2) {
cell.textLabel.text = _animationControllers[indexPath.row];
} else {
cell.textLabel.text = _interactionControllers[indexPath.row];
}
return cell;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return section < 2 ? _animationControllers.count : _interactionControllers.count;
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 4;
}
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
if (section == 0)
return @"Navigation push / pop animation controller";
if (section == 1)
return @"Settings present / dismiss animation controller";
if (section == 2)
return @"Navigation push / pop interaction controller";
if (section == 3)
return @"Settings present / dismiss interaction controller";
return @"";
}
@end
================================================
FILE: TransitionsDemo/TransitionsDemo/TransitionsDemo-Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.scottlogic.${PRODUCT_NAME:rfc1034identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>Launch Screen</string>
<key>UIMainStoryboardFile</key>
<string>Main_iPhone</string>
<key>UIMainStoryboardFile~ipad</key>
<string>Main_iPhone</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
================================================
FILE: TransitionsDemo/TransitionsDemo/TransitionsDemo-Prefix.pch
================================================
//
// Prefix header
//
// The contents of this file are implicitly included at the beginning of every source file.
//
#import <Availability.h>
#ifndef __IPHONE_5_0
#warning "This project uses features only available in iOS SDK 5.0 and later."
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#endif
================================================
FILE: TransitionsDemo/TransitionsDemo/ViewController.h
================================================
//
// ViewController.h
// TransitionsDemo
//
// Created by Colin Eberhardt on 10/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "CEReversibleAnimationController.h"
@interface ViewController : UIViewController
@property (nonatomic, strong) CEReversibleAnimationController *settingsAnimationController;
@end
================================================
FILE: TransitionsDemo/TransitionsDemo/ViewController.m
================================================
//
// ViewController.m
// ViewControllerTransitions
//
// Created by Colin Eberhardt on 08/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import "ViewController.h"
#import "AppDelegate.h"
#import "CEBaseInteractionController.h"
@interface ViewController () <UIViewControllerTransitioningDelegate>
@end
static int colorIndex = 0;
@implementation ViewController {
NSArray* _colors;
}
- (void)viewDidLoad
{
[super viewDidLoad];
_colors = @[[UIColor redColor],
[UIColor orangeColor],
[UIColor yellowColor],
[UIColor greenColor],
[UIColor blueColor],
[UIColor purpleColor]];
self.view.backgroundColor = _colors[colorIndex];
colorIndex = (colorIndex + 1) % _colors.count;
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"ShowSettings"]) {
UIViewController *toVC = segue.destinationViewController;
toVC.transitioningDelegate = self;
}
[super prepareForSegue:segue sender:sender];
}
#pragma mark - UIViewControllerTransitioningDelegate
- (id<UIViewControllerAnimatedTransitioning>)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source {
if (AppDelegateAccessor.settingsInteractionController) {
[AppDelegateAccessor.settingsInteractionController wireToViewController:presented forOperation:CEInteractionOperationDismiss];
}
AppDelegateAccessor.settingsAnimationController.reverse = NO;
return AppDelegateAccessor.settingsAnimationController;
}
- (id<UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed {
AppDelegateAccessor.settingsAnimationController.reverse = YES;
return AppDelegateAccessor.settingsAnimationController;
}
- (id<UIViewControllerInteractiveTransitioning>)interactionControllerForDismissal:(id<UIViewControllerAnimatedTransitioning>)animator {
return AppDelegateAccessor.settingsInteractionController && AppDelegateAccessor.settingsInteractionController.interactionInProgress ? AppDelegateAccessor.settingsInteractionController : nil;
}
@end
================================================
FILE: TransitionsDemo/TransitionsDemo/en.lproj/InfoPlist.strings
================================================
/* Localized versions of Info.plist keys */
================================================
FILE: TransitionsDemo/TransitionsDemo/main.m
================================================
//
// main.m
// TransitionsDemo
//
// Created by Colin Eberhardt on 10/09/2013.
// Copyright (c) 2013 Colin Eberhardt. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
================================================
FILE: TransitionsDemo/TransitionsDemo.xcodeproj/project.pbxproj
================================================
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
3CD5090B189FFE6900BAE35A /* CECubeAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3CD50909189FFE6900BAE35A /* CECubeAnimationController.m */; };
7273232017DFBD4D0072C7FD /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7273231F17DFBD4D0072C7FD /* Foundation.framework */; };
7273232217DFBD4D0072C7FD /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7273232117DFBD4D0072C7FD /* CoreGraphics.framework */; };
7273232417DFBD4D0072C7FD /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7273232317DFBD4D0072C7FD /* UIKit.framework */; };
7273232A17DFBD4D0072C7FD /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7273232817DFBD4D0072C7FD /* InfoPlist.strings */; };
7273232C17DFBD4D0072C7FD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 7273232B17DFBD4D0072C7FD /* main.m */; };
7273233017DFBD4D0072C7FD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7273232F17DFBD4D0072C7FD /* AppDelegate.m */; };
7273233317DFBD4D0072C7FD /* Main_iPhone.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7273233117DFBD4D0072C7FD /* Main_iPhone.storyboard */; };
7273233917DFBD4D0072C7FD /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7273233817DFBD4D0072C7FD /* ViewController.m */; };
7273233B17DFBD4D0072C7FD /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7273233A17DFBD4D0072C7FD /* Images.xcassets */; };
7273235F17DFBEBF0072C7FD /* CEFlipAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7273235B17DFBEBF0072C7FD /* CEFlipAnimationController.m */; };
7273236017DFBEBF0072C7FD /* CETurnAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7273235D17DFBEBF0072C7FD /* CETurnAnimationController.m */; };
7273236317DFBEFE0072C7FD /* CEReversibleAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7273236217DFBEFE0072C7FD /* CEReversibleAnimationController.m */; };
7273236917DFBF140072C7FD /* CEBaseInteractionController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7273236617DFBF140072C7FD /* CEBaseInteractionController.m */; };
7273236A17DFBF140072C7FD /* CEHorizontalSwipeInteractionController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7273236817DFBF140072C7FD /* CEHorizontalSwipeInteractionController.m */; };
7273236D17DFC0690072C7FD /* NavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7273236C17DFC0690072C7FD /* NavigationController.m */; };
7273237017DFC4710072C7FD /* SettingsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7273236F17DFC4710072C7FD /* SettingsViewController.m */; };
72B92C661856FE98001A2D84 /* CEPortalAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72B92C651856FE98001A2D84 /* CEPortalAnimationController.m */; };
72C15E1117E10C620056B3F9 /* CECrossfadeAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72C15E1017E10C620056B3F9 /* CECrossfadeAnimationController.m */; };
72C15E1417E10E7B0056B3F9 /* CEExplodeAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72C15E1317E10E7B0056B3F9 /* CEExplodeAnimationController.m */; };
72C15E1717E19A940056B3F9 /* CEFoldAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72C15E1617E19A940056B3F9 /* CEFoldAnimationController.m */; };
72EC05A917E7B1BE00DCB9A3 /* CEPinchInteractionController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EC05A817E7B1BE00DCB9A3 /* CEPinchInteractionController.m */; };
72EE96D817EF47A60097DF82 /* CECardsAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EE96D717EF47A60097DF82 /* CECardsAnimationController.m */; };
72EE96DB17EF66040097DF82 /* CEVerticalSwipeInteractionController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72EE96DA17EF66040097DF82 /* CEVerticalSwipeInteractionController.m */; };
7D0D046C1816DBA700F289A6 /* CENatGeoAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D0D046B1816DBA700F289A6 /* CENatGeoAnimationController.m */; };
A993F2801B80832400553FBD /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A993F27E1B80832400553FBD /* Launch Screen.storyboard */; };
BC46683B198B2E6700A07DF8 /* CEPanAnimationController.m in Sources */ = {isa = PBXBuildFile; fileRef = BC46683A198B2E6700A07DF8 /* CEPanAnimationController.m */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
3CD50909189FFE6900BAE35A /* CECubeAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CECubeAnimationController.m; sourceTree = "<group>"; };
3CD5090A189FFE6900BAE35A /* CECubeAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CECubeAnimationController.h; sourceTree = "<group>"; };
7273231C17DFBD4D0072C7FD /* TransitionsDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = TransitionsDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
7273231F17DFBD4D0072C7FD /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
7273232117DFBD4D0072C7FD /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
7273232317DFBD4D0072C7FD /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
7273232717DFBD4D0072C7FD /* TransitionsDemo-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TransitionsDemo-Info.plist"; sourceTree = "<group>"; };
7273232917DFBD4D0072C7FD /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
7273232B17DFBD4D0072C7FD /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
7273232D17DFBD4D0072C7FD /* TransitionsDemo-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "TransitionsDemo-Prefix.pch"; sourceTree = "<group>"; };
7273232E17DFBD4D0072C7FD /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
7273232F17DFBD4D0072C7FD /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
7273233217DFBD4D0072C7FD /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main_iPhone.storyboard; sourceTree = "<group>"; };
7273233717DFBD4D0072C7FD /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
7273233817DFBD4D0072C7FD /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
7273233A17DFBD4D0072C7FD /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
7273234117DFBD4D0072C7FD /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
7273235A17DFBEBF0072C7FD /* CEFlipAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CEFlipAnimationController.h; sourceTree = "<group>"; };
7273235B17DFBEBF0072C7FD /* CEFlipAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CEFlipAnimationController.m; sourceTree = "<group>"; };
7273235C17DFBEBF0072C7FD /* CETurnAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CETurnAnimationController.h; sourceTree = "<group>"; };
7273235D17DFBEBF0072C7FD /* CETurnAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CETurnAnimationController.m; sourceTree = "<group>"; };
7273236117DFBEFE0072C7FD /* CEReversibleAnimationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CEReversibleAnimationController.h; sourceTree = "<group>"; };
7273236217DFBEFE0072C7FD /* CEReversibleAnimationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CEReversibleAnimationController.m; sourceTree = "<group>"; };
7273236517DFBF140072C7FD /* C
gitextract_s4rkdg0k/ ├── .gitignore ├── AnimationControllers/ │ ├── CECardsAnimationController.h │ ├── CECardsAnimationController.m │ ├── CECrossfadeAnimationController.h │ ├── CECrossfadeAnimationController.m │ ├── CECubeAnimationController.h │ ├── CECubeAnimationController.m │ ├── CEExplodeAnimationController.h │ ├── CEExplodeAnimationController.m │ ├── CEFlipAnimationController.h │ ├── CEFlipAnimationController.m │ ├── CEFoldAnimationController.h │ ├── CEFoldAnimationController.m │ ├── CENatGeoAnimationController.h │ ├── CENatGeoAnimationController.m │ ├── CEPanAnimationController.h │ ├── CEPanAnimationController.m │ ├── CEPortalAnimationController.h │ ├── CEPortalAnimationController.m │ ├── CEReversibleAnimationController.h │ ├── CEReversibleAnimationController.m │ ├── CETurnAnimationController.h │ └── CETurnAnimationController.m ├── CHANGELOG.md ├── InteractionControllers/ │ ├── CEBaseInteractionController.h │ ├── CEBaseInteractionController.m │ ├── CEHorizontalSwipeInteractionController.h │ ├── CEHorizontalSwipeInteractionController.m │ ├── CEPinchInteractionController.h │ ├── CEPinchInteractionController.m │ ├── CEVerticalSwipeInteractionController.h │ └── CEVerticalSwipeInteractionController.m ├── MIT-LICENSE.txt ├── README.md ├── TabBarDemo/ │ ├── TabBarDemo/ │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj/ │ │ │ ├── Main_iPad.storyboard │ │ │ └── Main_iPhone.storyboard │ │ ├── Images.xcassets/ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ └── Contents.json │ │ │ └── LaunchImage.launchimage/ │ │ │ └── Contents.json │ │ ├── TabBarDemo-Info.plist │ │ ├── TabBarDemo-Prefix.pch │ │ ├── TabBarViewController.h │ │ ├── TabBarViewController.m │ │ ├── ViewController.h │ │ ├── ViewController.m │ │ ├── en.lproj/ │ │ │ └── InfoPlist.strings │ │ └── main.m │ ├── TabBarDemo.xcodeproj/ │ │ ├── project.pbxproj │ │ └── project.xcworkspace/ │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata/ │ │ └── TabBarDemo.xccheckout │ └── TabBarDemoTests/ │ ├── TabBarDemoTests-Info.plist │ ├── TabBarDemoTests.m │ └── en.lproj/ │ └── InfoPlist.strings ├── TransitionsDemo/ │ ├── TransitionsDemo/ │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj/ │ │ │ ├── Launch Screen.storyboard │ │ │ └── Main_iPhone.storyboard │ │ ├── Images.xcassets/ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ └── Contents.json │ │ │ └── LaunchImage.launchimage/ │ │ │ └── Contents.json │ │ ├── NavigationController.h │ │ ├── NavigationController.m │ │ ├── SettingsViewController.h │ │ ├── SettingsViewController.m │ │ ├── TransitionsDemo-Info.plist │ │ ├── TransitionsDemo-Prefix.pch │ │ ├── ViewController.h │ │ ├── ViewController.m │ │ ├── en.lproj/ │ │ │ └── InfoPlist.strings │ │ └── main.m │ └── TransitionsDemo.xcodeproj/ │ ├── project.pbxproj │ └── project.xcworkspace/ │ └── contents.xcworkspacedata └── VCTransitionsLibrary.podspec
SYMBOL INDEX (4 symbols across 3 files)
FILE: AnimationControllers/CECubeAnimationController.h
type CubeAnimationWay (line 12) | typedef enum {CubeAnimationWayHorizontal, CubeAnimationWayVertical} Cube...
type CubeAnimationType (line 13) | typedef enum {CubeAnimationTypeInverse, CubeAnimationTypeNormal} CubeAni...
FILE: AnimationControllers/CETurnAnimationController.h
type CEDirectionHorizontal (line 12) | typedef NS_ENUM(NSInteger, CEDirection) {
FILE: InteractionControllers/CEBaseInteractionController.h
type CEInteractionOperationPop (line 14) | typedef NS_ENUM(NSInteger, CEInteractionOperation) {
Condensed preview — 73 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (225K chars).
[
{
"path": ".gitignore",
"chars": 3431,
"preview": "#########################\n# .gitignore file for Xcode4 / OS X Source projects\n#\n# Version 2.0\n# For latest version, s"
},
{
"path": "AnimationControllers/CECardsAnimationController.h",
"chars": 292,
"preview": "//\n// CEZoomAnimationController.h\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 22/09/2013.\n// Copyright (c"
},
{
"path": "AnimationControllers/CECardsAnimationController.m",
"chars": 5044,
"preview": "//\n// CEZoomAnimationController.m\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 22/09/2013.\n// Copyright (c"
},
{
"path": "AnimationControllers/CECrossfadeAnimationController.h",
"chars": 388,
"preview": "//\n// CECrossfadeAnimationController.h\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 11/09/2013.\n// Copyrig"
},
{
"path": "AnimationControllers/CECrossfadeAnimationController.m",
"chars": 1315,
"preview": "//\n// CECrossfadeAnimationController.m\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 11/09/2013.\n// Copyrig"
},
{
"path": "AnimationControllers/CECubeAnimationController.h",
"chars": 610,
"preview": "//\n// CubeNavigationAnimator.h\n// MovieQuiz\n//\n// Created by Andrés Brun on 27/10/13.\n// Copyright (c) 2013 Andrés B"
},
{
"path": "AnimationControllers/CECubeAnimationController.m",
"chars": 4671,
"preview": "//\n// CubeNavigationAnimator.m\n// MovieQuiz\n//\n// Created by Andrés Brun on 27/10/13.\n// Copyright (c) 2013 Andrés B"
},
{
"path": "AnimationControllers/CEExplodeAnimationController.h",
"chars": 456,
"preview": "//\n// CEExplodeAnimationController.h\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 11/09/2013.\n// Copyright"
},
{
"path": "AnimationControllers/CEExplodeAnimationController.m",
"chars": 2707,
"preview": "//\n// CEExplodeAnimationController.m\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 11/09/2013.\n// Copyright"
},
{
"path": "AnimationControllers/CEFlipAnimationController.h",
"chars": 382,
"preview": "//\n// CEFlipAnimationController.h\n// ViewControllerTransitions\n//\n// Created by Colin Eberhardt on 09/09/2013.\n// Co"
},
{
"path": "AnimationControllers/CEFlipAnimationController.m",
"chars": 7990,
"preview": "//\n// CEFlipAnimationController.m\n// ViewControllerTransitions\n//\n// Created by Colin Eberhardt on 09/09/2013.\n// Co"
},
{
"path": "AnimationControllers/CEFoldAnimationController.h",
"chars": 489,
"preview": "//\n// CEAccordionAnimationController.h\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 12/09/2013.\n// Copyrig"
},
{
"path": "AnimationControllers/CEFoldAnimationController.m",
"chars": 8862,
"preview": "//\n// CEAccordionAnimationController.m\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 12/09/2013.\n// Copyrig"
},
{
"path": "AnimationControllers/CENatGeoAnimationController.h",
"chars": 421,
"preview": "//\n// CENatGeoAnimationController.h\n// TransitionsDemo\n//\n// Created by Paweł Wrzosek on 22.10.2013.\n// Copyright (c"
},
{
"path": "AnimationControllers/CENatGeoAnimationController.m",
"chars": 6964,
"preview": "//\n// CENatGeoAnimationController.m\n// TransitionsDemo\n//\n// Created by Paweł Wrzosek on 22.10.2013.\n// Copyright (c"
},
{
"path": "AnimationControllers/CEPanAnimationController.h",
"chars": 359,
"preview": "//\n// CEPanAnimationController.h\n// TransitionsDemo\n//\n// Created by Alvin Zeng on 01/08/2014.\n// Copyright (c) 2014"
},
{
"path": "AnimationControllers/CEPanAnimationController.m",
"chars": 2099,
"preview": "//\n// CEPanAnimationController.m\n// TransitionsDemo\n//\n// Created by Alvin Zeng on 01/08/2014.\n// Copyright (c) 2014"
},
{
"path": "AnimationControllers/CEPortalAnimationController.h",
"chars": 374,
"preview": "//\n// ZENPortalAnimationController.h\n// ZEN BabyBook\n//\n// Created by Frédéric ADDA on 07/12/2013.\n// Copyright (c) "
},
{
"path": "AnimationControllers/CEPortalAnimationController.m",
"chars": 7821,
"preview": "//\n// ZENPortalAnimationController.m\n// ZEN BabyBook\n//\n// Created by Frédéric ADDA on 07/12/2013.\n// Copyright (c) "
},
{
"path": "AnimationControllers/CEReversibleAnimationController.h",
"chars": 1033,
"preview": "//\n// CEBaseAnimationController.h\n// ViewControllerTransitions\n//\n// Created by Colin Eberhardt on 09/09/2013.\n// Co"
},
{
"path": "AnimationControllers/CEReversibleAnimationController.m",
"chars": 1211,
"preview": "//\n// CEBaseAnimationController.m\n// ViewControllerTransitions\n//\n// Created by Colin Eberhardt on 09/09/2013.\n// Co"
},
{
"path": "AnimationControllers/CETurnAnimationController.h",
"chars": 686,
"preview": "//\n// CEFlipAnimationController.h\n// ViewControllerTransitions\n//\n// Created by Colin Eberhardt on 08/09/2013.\n// Co"
},
{
"path": "AnimationControllers/CETurnAnimationController.m",
"chars": 3091,
"preview": "//\n// CEFlipAnimationController.m\n// ViewControllerTransitions\n//\n// Created by Colin Eberhardt on 08/09/2013.\n// Co"
},
{
"path": "CHANGELOG.md",
"chars": 218,
"preview": "# Version 1.1.0\n\n + Added `CECardsAnimationController`\n + Added `CEVerticalSwipeInteractionController`\n + Renamed `CESwi"
},
{
"path": "InteractionControllers/CEBaseInteractionController.h",
"chars": 1567,
"preview": "//\n// CEBaseInteractionController.h\n// ViewControllerTransitions\n//\n// Created by Colin Eberhardt on 10/09/2013.\n// "
},
{
"path": "InteractionControllers/CEBaseInteractionController.m",
"chars": 657,
"preview": "//\n// CEBaseInteractionController.m\n// ViewControllerTransitions\n//\n// Created by Colin Eberhardt on 10/09/2013.\n// "
},
{
"path": "InteractionControllers/CEHorizontalSwipeInteractionController.h",
"chars": 829,
"preview": "//\n// SwipeInteractionController.h\n// ILoveCatz\n//\n// Created by Colin Eberhardt on 22/08/2013.\n// Copyright (c) 201"
},
{
"path": "InteractionControllers/CEHorizontalSwipeInteractionController.m",
"chars": 4829,
"preview": "//\n// SwipeINteractionController.m\n// ILoveCatz\n//\n// Created by Colin Eberhardt on 22/08/2013.\n// Copyright (c) 201"
},
{
"path": "InteractionControllers/CEPinchInteractionController.h",
"chars": 289,
"preview": "//\n// CEPinchInteractionController.h\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 16/09/2013.\n// Copyright"
},
{
"path": "InteractionControllers/CEPinchInteractionController.m",
"chars": 2781,
"preview": "//\n// CEPinchInteractionController.m\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 16/09/2013.\n// Copyright"
},
{
"path": "InteractionControllers/CEVerticalSwipeInteractionController.h",
"chars": 540,
"preview": "//\n// CEVerticalSwipeInteactionController.h\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 22/09/2013.\n// Co"
},
{
"path": "InteractionControllers/CEVerticalSwipeInteractionController.m",
"chars": 4174,
"preview": "//\n// CEVerticalSwipeInteactionController.m\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 22/09/2013.\n// Co"
},
{
"path": "MIT-LICENSE.txt",
"chars": 1075,
"preview": "Copyright 2013 Colin Eberhardt\nLinq to Objective-C\n\nPermission is hereby granted, free of charge, to any person obtainin"
},
{
"path": "README.md",
"chars": 18022,
"preview": "# View Controller Transitions Library\n\nWith iOS 7 you can easily create custom view controller transitions that can be u"
},
{
"path": "TabBarDemo/TabBarDemo/AppDelegate.h",
"chars": 291,
"preview": "//\n// AppDelegate.h\n// TabBarDemo\n//\n// Created by Colin Eberhardt on 17/09/2013.\n// Copyright (c) 2013 Colin Eberha"
},
{
"path": "TabBarDemo/TabBarDemo/AppDelegate.m",
"chars": 405,
"preview": "//\n// AppDelegate.m\n// TabBarDemo\n//\n// Created by Colin Eberhardt on 17/09/2013.\n// Copyright (c) 2013 Colin Eberha"
},
{
"path": "TabBarDemo/TabBarDemo/Base.lproj/Main_iPad.storyboard",
"chars": 1604,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "TabBarDemo/TabBarDemo/Base.lproj/Main_iPhone.storyboard",
"chars": 11279,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "TabBarDemo/TabBarDemo/Images.xcassets/AppIcon.appiconset/Contents.json",
"chars": 825,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"iphone\",\n \"size\" : \"29x29\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\""
},
{
"path": "TabBarDemo/TabBarDemo/Images.xcassets/LaunchImage.launchimage/Contents.json",
"chars": 1100,
"preview": "{\n \"images\" : [\n {\n \"orientation\" : \"portrait\",\n \"idiom\" : \"iphone\",\n \"extent\" : \"full-screen\",\n "
},
{
"path": "TabBarDemo/TabBarDemo/TabBarDemo-Info.plist",
"chars": 1590,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "TabBarDemo/TabBarDemo/TabBarDemo-Prefix.pch",
"chars": 344,
"preview": "//\n// Prefix header\n//\n// The contents of this file are implicitly included at the beginning of every source file.\n//\n"
},
{
"path": "TabBarDemo/TabBarDemo/TabBarViewController.h",
"chars": 243,
"preview": "//\n// TabBarViewController.h\n// TabBarDemo\n//\n// Created by Colin Eberhardt on 18/09/2013.\n// Copyright (c) 2013 Col"
},
{
"path": "TabBarDemo/TabBarDemo/TabBarViewController.m",
"chars": 2534,
"preview": "//\n// TabBarViewController.m\n// TabBarDemo\n//\n// Created by Colin Eberhardt on 18/09/2013.\n// Copyright (c) 2013 Col"
},
{
"path": "TabBarDemo/TabBarDemo/ViewController.h",
"chars": 229,
"preview": "//\n// ViewController.h\n// TabBarDemo\n//\n// Created by Colin Eberhardt on 17/09/2013.\n// Copyright (c) 2013 Colin Ebe"
},
{
"path": "TabBarDemo/TabBarDemo/ViewController.m",
"chars": 255,
"preview": "//\n// ViewController.m\n// TabBarDemo\n//\n// Created by Colin Eberhardt on 17/09/2013.\n// Copyright (c) 2013 Colin Ebe"
},
{
"path": "TabBarDemo/TabBarDemo/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "TabBarDemo/TabBarDemo/main.m",
"chars": 351,
"preview": "//\n// main.m\n// TabBarDemo\n//\n// Created by Colin Eberhardt on 17/09/2013.\n// Copyright (c) 2013 Colin Eberhardt. Al"
},
{
"path": "TabBarDemo/TabBarDemo.xcodeproj/project.pbxproj",
"chars": 29505,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "TabBarDemo/TabBarDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 155,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:TabBarDemo.xcod"
},
{
"path": "TabBarDemo/TabBarDemo.xcodeproj/project.xcworkspace/xcshareddata/TabBarDemo.xccheckout",
"chars": 1543,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "TabBarDemo/TabBarDemoTests/TabBarDemoTests-Info.plist",
"chars": 694,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "TabBarDemo/TabBarDemoTests/TabBarDemoTests.m",
"chars": 659,
"preview": "//\n// TabBarDemoTests.m\n// TabBarDemoTests\n//\n// Created by Colin Eberhardt on 17/09/2013.\n// Copyright (c) 2013 Col"
},
{
"path": "TabBarDemo/TabBarDemoTests/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "TransitionsDemo/TransitionsDemo/AppDelegate.h",
"chars": 1034,
"preview": "//\n// AppDelegate.h\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 10/09/2013.\n// Copyright (c) 2013 Colin E"
},
{
"path": "TransitionsDemo/TransitionsDemo/AppDelegate.m",
"chars": 647,
"preview": "//\n// AppDelegate.m\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 10/09/2013.\n// Copyright (c) 2013 Colin E"
},
{
"path": "TransitionsDemo/TransitionsDemo/Base.lproj/Launch Screen.storyboard",
"chars": 1667,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "TransitionsDemo/TransitionsDemo/Base.lproj/Main_iPhone.storyboard",
"chars": 11197,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard"
},
{
"path": "TransitionsDemo/TransitionsDemo/Images.xcassets/AppIcon.appiconset/Contents.json",
"chars": 1077,
"preview": "{\n \"images\" : [\n {\n \"idiom\" : \"iphone\",\n \"size\" : \"29x29\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\""
},
{
"path": "TransitionsDemo/TransitionsDemo/Images.xcassets/LaunchImage.launchimage/Contents.json",
"chars": 1100,
"preview": "{\n \"images\" : [\n {\n \"orientation\" : \"portrait\",\n \"idiom\" : \"iphone\",\n \"extent\" : \"full-screen\",\n "
},
{
"path": "TransitionsDemo/TransitionsDemo/NavigationController.h",
"chars": 267,
"preview": "//\n// NavigationControllerViewController.h\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 10/09/2013.\n// Cop"
},
{
"path": "TransitionsDemo/TransitionsDemo/NavigationController.m",
"chars": 2357,
"preview": "//\n// MyNavigationControllerViewController.m\n// ViewControllerTransitions\n//\n// Created by Colin Eberhardt on 09/09/2"
},
{
"path": "TransitionsDemo/TransitionsDemo/SettingsViewController.h",
"chars": 255,
"preview": "//\n// SettingsViewController.h\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 10/09/2013.\n// Copyright (c) 2"
},
{
"path": "TransitionsDemo/TransitionsDemo/SettingsViewController.m",
"chars": 5613,
"preview": "//\n// SettingsViewController.m\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 10/09/2013.\n// Copyright (c) 2"
},
{
"path": "TransitionsDemo/TransitionsDemo/TransitionsDemo-Info.plist",
"chars": 1659,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
},
{
"path": "TransitionsDemo/TransitionsDemo/TransitionsDemo-Prefix.pch",
"chars": 344,
"preview": "//\n// Prefix header\n//\n// The contents of this file are implicitly included at the beginning of every source file.\n//\n"
},
{
"path": "TransitionsDemo/TransitionsDemo/ViewController.h",
"chars": 371,
"preview": "//\n// ViewController.h\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 10/09/2013.\n// Copyright (c) 2013 Coli"
},
{
"path": "TransitionsDemo/TransitionsDemo/ViewController.m",
"chars": 2336,
"preview": "//\n// ViewController.m\n// ViewControllerTransitions\n//\n// Created by Colin Eberhardt on 08/09/2013.\n// Copyright (c)"
},
{
"path": "TransitionsDemo/TransitionsDemo/en.lproj/InfoPlist.strings",
"chars": 45,
"preview": "/* Localized versions of Info.plist keys */\n\n"
},
{
"path": "TransitionsDemo/TransitionsDemo/main.m",
"chars": 356,
"preview": "//\n// main.m\n// TransitionsDemo\n//\n// Created by Colin Eberhardt on 10/09/2013.\n// Copyright (c) 2013 Colin Eberhard"
},
{
"path": "TransitionsDemo/TransitionsDemo.xcodeproj/project.pbxproj",
"chars": 28512,
"preview": "// !$*UTF8*$!\n{\n\tarchiveVersion = 1;\n\tclasses = {\n\t};\n\tobjectVersion = 46;\n\tobjects = {\n\n/* Begin PBXBuildFile section *"
},
{
"path": "TransitionsDemo/TransitionsDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata",
"chars": 160,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workspace\n version = \"1.0\">\n <FileRef\n location = \"self:TransitionsDemo"
},
{
"path": "VCTransitionsLibrary.podspec",
"chars": 653,
"preview": "Pod::Spec.new do |s|\n s.name = 'VCTransitionsLibrary'\n s.version = '1.5.0'\n s.summary = 'A collecti"
}
]
About this extraction
This page contains the full source code of the ColinEberhardt/VCTransitionsLibrary GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 73 files (204.1 KB), approximately 56.5k tokens, and a symbol index with 4 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.