Giter VIP home page Giter VIP logo

vctransitionslibrary's Introduction

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.

Flip Fold Crossfade Explode
Turn Cards NatGeo Portal
Cube Pan

Contents

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 - 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.

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!

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.

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:

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.

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:

- (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;
}

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:

- (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;
}

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.

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:

// 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).

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:

// 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;
}

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:

@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

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. It's an adoptation of 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)

Cube animation - CECubeAnimationController

This transition gives the appearance of rotating the faces of a cube.

(courtesy of Andrés Brun)

vctransitionslibrary's People

Contributors

andresbrun avatar azanium avatar colineberhardt avatar cyndibaby905 avatar devangmundhra avatar divinedominion avatar jakelin avatar junjie avatar kerryknight avatar readmecritic avatar stevenchan avatar tbaranes avatar wangii avatar wzs avatar xinsight avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vctransitionslibrary's Issues

Explode transition

I also noticed that the explode transition is much longer to fire on a real device than on the simulator (there is something like 1 sec delay)

How to use?

The first use, I feel unfriendly.Description is not detailed...

unwindToRootVC throws EXC_BAD_ACCESS

Portal in place. Unwind button from Modal. After hitting the unwindToRootVC breakpoint and allowing the app to continue an EXC_BAD_ACCESS exception is thrown. Version 5.1 (5B130a). Call stack below. Disabling transitions allows unwind to succeed.
screen shot 2014-04-07 at 4 33 33 pm

Blurry bitmap after flip transition; safe to modify for landscape mode?

Hey there, I'm not sure if these are issues with your code or mine, so thanks in advance for putting this project out there at all.

I'm noticing that if I do a Flip transition (per your code) back and forth between two view controllers, the text in those view controllers will become blurry and the whole image becomes degraded. Rotating to landscape (forcing a redrawing of the cells, in a collection view) doesn't fix it, even though the cells are redrawn from scratch.

That brings me to my second point, which is using the Flip transition in Landscape mode. I'm imagining this should be possible by addressing the geometry, but I'm wondering if you know of any reasons why doing that would be hard or bad.

Thanks much!

Update: also noticing this same blurring in the CETurnAnimationController.

UINavigation controller with VCTransitionLibrary pop shows black screen when pushed without animation

Hi,

I followed your tutorials and use your VCTransitionLibrary in my app, here is my App structure :

  1. A NavigationController is the root of the application (using your tutorial code)
  2. MyRootViewController is the root view controller in the NavigationController
  3. MyPushedViewController is pushed or poped with animations by MyRootViewController

Everything is fine with animations, but a problem occur in the following configuration :

  1. MyRootViewController is on screen, (the only ViewController in the NavigationController stack)
  2. App goes to background
  3. App goes to foreground :
    3.1) applicationWillEnterForeground fires a notification to NSNotificationCenter defaultCenter
    3.2) MyRootViewController listen to this notification and execute the following code :
    // pop to root
    [self.navigationController popToRootViewControllerAnimated:NO];
    // instantiate new view controller
    MyPushedViewController *mpvc = [self.storyboard instantiateViewControllerWithIdentifier:@"MyPushedViewController"];
    // mpvc init code...
    // ...
    // push the new view controller
    [self.navigationController pushViewController:ncvc animated:NO];
  4. MyPushedViewController is displayed without any problem
  5. User swipe to trigger a pop, and MyRootViewController is black, not appearing in animation (but it's viewWillAppear is triggered).

I need to use animated:NO because I don't want the app to show anything else than MyPushedViewController when it's back to foreground.
The is no problem in any other configuration :
animated:YES display the animation fine
when MyPushedViewController was on screen, it's also working fine

Do you have any clue about this problem ?

Thanks for your work and your time !

Forest and Trees...

Colin, sorry to bother you. Could you please provide a code snippet to use in the example VC to select a set (turn?) transition.. I'm afraid I'm overwhelmed with content ~) (Ialso have low vision)...

Cards animation with UINavigationController incorrect offset

The cards animation works but my final view has an incorrect offset of 30px that hides behind the navigation bar (a NOT-translucent navigation bar).

My guess is it has something do with:
[UIView addKeyframeWithRelativeStartTime:0.6f relativeDuration:0.2f animations:^{
toView.frame = CGRectOffset(containerView.frame, 0.0, -30.0);
}];
As here I see a -30 px offset..

after UIViewController popped with transition - UIView position of the current controller changed

Hello Colin,

you did a great job. I like VCTransitionsLibrary and used it a lot in my projects. Thanks!

But recently I encountered a problem.

I have a simple setup:

UINavigationController with VCTransitionsLibrary.

There is some root controller with UIView which uses Auto Layout and positioned with Top Layout Guide and Bottom Layout Guide.

Then I push another controller to UINavigationController.
Everything is ok.
When I pop this controller - UIView of root controller goes under NavigationBar - it means without respect of Auto Layout with Top Layout Guide.

If I disable transition from VCTransitionsLibrary - everything works as it should.
Could you help me?

Add a delegate to signal animation completion

Hi Colin,

I just finished working on the chapter about Custom transitions, so I was very surprised (and happy) to see that this library in CocoaControls was in fact yours !
Thanks for this awesome library :-)

I would like to implement a "fold" transition with a TabBarController with 2 tabs. But I would like each tab to have a distinct color when selected.
Unfortunately, the horizontal swipe does not go through:

  • (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController

so I don't have a chance to set self.view.tintColor to the right color.

Is there a way to set the toVC tab tintColor when using an horizontal swipe ?

Thanks
Frederic

PanAnimation on tab bar not working.

Tab bar swipe animation stopped working
if tabBar.selectedIdex = n is called. (n index of tab)
If I removed this line then all animation will work good again.
tabBar.selectedIdex = n is called in a callback method. (didUpdateLocations)

App hangs if the animation is completed manually with interaction controller enabled.

Hi,

Great library.
Observed an issue with the implementation. The issue is that if an interaction controller and animation controller are both set, and if a transition animation is completed fully by hand after that, the app just hangs.

Reproduction of the bug (Occurs with NavigationController example as well)-

  1. In the settings page, choose "Flip" animation type and "Horizontal Swipe" for the "Settings" section
  2. Press "Done" (Flip animation observed)
  3. Press Settings again (Flip animation observed again)
  4. Starting on the right side of the screen, pan to the left side until the "MyView" page is completely visible (so that leaving the mouse/lifting the finger from the touch) does not do any more animation.
  5. Now the app hangs.

The problem seems to be that for the animation controller, while the - (void)animateTransition:(id<UIViewControllerContextTransitioning>)transitionContext is called at the beginning of the interaction, since the animation is completed fully manually, the completeTransition method is not called from the [UIView animateKeyframesWithDuration.. ]'s completion handler.

Double Transition Issue

Hey Colin,

Big fan of the library! I encountered a small issue - when I present a new NavigationController with a ViewController as its root as such:
UINavigationController *n = [[UINavigationController alloc] initWithRoot:someVC];
and then manually wire up the VC's interactionController in its viewDidLoad, the interaction is off: I will start a horizontal slide, and the view seems to slide to the right twice as fast, and on release often bounces back again. When I do the gesture a second time it works fine. Any suggestions what might cause this behaviour? Thanks!

wiretoController is only called when a tab is selected from tabbar

Hello Colin,

Thanks for the library its fantastic however I am having some issues using my tabBarController and CEHorizontalSwipeInteractionController. My problem is that WireToViewController is not called until you first tap on each tab in the tab bar. This means that none of the views in the tab bar controller have UIGestureRecognisers when the app first boots and display, preventing me from using gestures to transition without first tapping each tab. Is there a way I could workaround this?

Thanks

Issue when presenting view controller is a UITableViewController with FRC

Sorry for the bombardment with bug reports, but this is a very interesting library which I think will make UI experience in apps much better, so investing quite some time on it.

I found a bug, and even with a lot of debugging, I wasn't able to find the issue. So I thought it would be best if I could demonstrate the issue and see if you could help me out.
Following is a link to a git repository which has an XCode project which can be used to reproduce the issue. It also has a link to a video which shows the issue.

The issue is that if during a dismiss transition using interaction, if the interaction is left half way such that the transition will be dismissed, it kind of shows the back view. Its difficult to explain hence the video, where you can see in try 2 and 4, the red color fills the screen momentarily. You can also see that instead of the animation occurring smoothly, it just snaps.

Let me know if you need more info. I would be happy to help for more debugging.

https://github.com/devangmundhra/VCTransitoinsLibrary_FRC_Bug

VCTransitionsLibrary should not generate Analyzer warnings in XCode 5.1.1

Hi,

Nice library, thanks so much for making this available!

When I do an Analyze in XCode 5.1.1, Shift - Cmd -B, I get a bunch of warnings and memory leak warnings from the analyzer. These should be fixed so projects that depend on VCTransitionsLibrary can build warning-free.

Thanks!

/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/InteractionControllers/CEHorizontalSwipeInteractionController.m
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/InteractionControllers/CEHorizontalSwipeInteractionController.m:20:1: Method possibly missing a [super dealloc] call
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/InteractionControllers/CEPinchInteractionController.m
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/InteractionControllers/CEPinchInteractionController.m:21:1: Method possibly missing a [super dealloc] call
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/InteractionControllers/CEVerticalSwipeInteractionController.m
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/InteractionControllers/CEVerticalSwipeInteractionController.m:20:1: Method possibly missing a [super dealloc] call
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CECubeAnimationController.m
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CECubeAnimationController.m:124:3: Potential leak of an object stored into 'shadowView'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFlipAnimationController.m
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFlipAnimationController.m:130:5: Potential leak of an object stored into 'shadowView'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFlipAnimationController.m:130:5: Potential leak of an object stored into 'viewWithShadow'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:43:33: Potential leak of an object
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:43:19: Entering loop body
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:65:35: Calling 'createSnapshotFromView:afterUpdates:location:left:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:126:1: Entered call from 'animateTransition:fromVC:toVC:fromView:toView:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:151:38: Calling 'addShadowToView:reverse:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:165:1: Entered call from 'createSnapshotFromView:afterUpdates:location:left:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:168:30: Method returns an Objective-C object with a +1 retain count
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:151:38: Returning from 'addShadowToView:reverse:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:65:35: Returning from 'createSnapshotFromView:afterUpdates:location:left:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:43:33: Object leaked: allocated object is not referenced later in this execution path and has a retain count of +1
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:51:10: Potential leak of an object
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:43:19: Entering loop body
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:48:36: Calling 'createSnapshotFromView:afterUpdates:location:left:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:126:1: Entered call from 'animateTransition:fromVC:toVC:fromView:toView:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:151:38: Calling 'addShadowToView:reverse:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:165:1: Entered call from 'createSnapshotFromView:afterUpdates:location:left:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:168:30: Method returns an Objective-C object with a +1 retain count
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:151:38: Returning from 'addShadowToView:reverse:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:48:36: Returning from 'createSnapshotFromView:afterUpdates:location:left:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:51:10: Object leaked: allocated object is not referenced later in this execution path and has a retain count of +1
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:56:10: Potential leak of an object
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:43:19: Entering loop body
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:53:37: Calling 'createSnapshotFromView:afterUpdates:location:left:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:126:1: Entered call from 'animateTransition:fromVC:toVC:fromView:toView:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:151:38: Calling 'addShadowToView:reverse:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:165:1: Entered call from 'createSnapshotFromView:afterUpdates:location:left:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:168:30: Method returns an Objective-C object with a +1 retain count
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:151:38: Returning from 'addShadowToView:reverse:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:53:37: Returning from 'createSnapshotFromView:afterUpdates:location:left:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:56:10: Object leaked: allocated object is not referenced later in this execution path and has a retain count of +1
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:65:35: Potential leak of an object
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:43:19: Entering loop body
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:60:34: Calling 'createSnapshotFromView:afterUpdates:location:left:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:126:1: Entered call from 'animateTransition:fromVC:toVC:fromView:toView:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:151:38: Calling 'addShadowToView:reverse:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:165:1: Entered call from 'createSnapshotFromView:afterUpdates:location:left:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:168:30: Method returns an Objective-C object with a +1 retain count
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:151:38: Returning from 'addShadowToView:reverse:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:60:34: Returning from 'createSnapshotFromView:afterUpdates:location:left:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:65:35: Object leaked: allocated object is not referenced later in this execution path and has a retain count of +1
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:151:5: Potential leak of an object stored into 'snapshotView'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:134:9: Assuming 'afterUpdates' is not equal to 0
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:142:24: Method returns an Objective-C object with a +1 retain count
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:151:5: Object leaked: object allocated and stored into 'snapshotView' is not referenced later in this execution path and has a retain count of +1
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:187:5: Potential leak of an object stored into 'shadowView'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:43:19: Entering loop body
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:48:36: Calling 'createSnapshotFromView:afterUpdates:location:left:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:126:1: Entered call from 'animateTransition:fromVC:toVC:fromView:toView:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:151:38: Calling 'addShadowToView:reverse:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:165:1: Entered call from 'createSnapshotFromView:afterUpdates:location:left:'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:171:26: Method returns an Objective-C object with a +1 retain count
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:187:5: Object leaked: object allocated and stored into 'shadowView' is not referenced later in this execution path and has a retain count of +1
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:187:5: Potential leak of an object stored into 'viewWithShadow'
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:168:30: Method returns an Objective-C object with a +1 retain count
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:176:39: Assuming 'reverse' is 0
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:187:5: Object returned to caller as an owning reference (single retain count transferred to caller)
/Users/iosdev/Desktop/ParticleMatch/Pods/VCTransitionsLibrary/AnimationControllers/CEFoldAnimationController.m:187:5: Object leaked: object allocated and stored into 'viewWithShadow' is returned from a method whose name ('addShadowToView:reverse:') does not start with 'copy', 'mutableCopy', 'alloc' or 'new'. This violates the naming convention rules given in the Memory Management Guide for Cocoa

Cut a new release

I'd like to use the pan animation. Can you cut a new release so I don't have to specify :head in my Podfile?

invalid context 0x0

CGContextGetBaseCTM: invalid context 0x0. This is a serious error. This application, or a library it uses, is using an invalid context and is thereby contributing to an overall degradation of system stability and reliability. This notice is a courtesy: please fix this problem. It will become a fatal error in an upcoming update.

error is thrown every animation frame.

XCode 5.1 / SDK: iOS 7.1

Proper way to get the direction of pan gesture recognizer

Hi,

In the HorizontalInteractionController, the direction of the UIPanGestureRecognizer is found by:

CGPoint translation = [gestureRecognizer translationInView:gestureRecognizer.view.superview];
BOOL rightToLeftSwipe = translation.x < 0;

However, I think with this way, a pan gesture will always start with a translation of 0.
The correct way to get the direction would be-

CGPoint vel = [gestureRecognizer velocityInView:gestureRecognizer.view];
BOOL rightToLeftSwipe = vel.x < 0;

Cocoapods bug

The same code, drag and drop to the normal operation of the project, the use of cocoapods integration problems!

Push Not Working

First of all thanks for the library, really great work!

I have modified the horizontal swipe control to allow for push as well as pop. It appears that gestures don't get recognised until after I press the next button. Once I have pressed next for the first time push and pop using the swipe work perfectly. How can I get gestures to be recognised as soon as the app starts?

Here is my slight modification to enable push:

        if (!rightToLeftSwipe) {
            self.interactionInProgress = YES;
            [_viewController.navigationController popViewControllerAnimated:YES];
        } else {
            self.interactionInProgress = YES;
            UIStoryboard *sb = [UIStoryboard storyboardWithName:@"Main_iPhone" bundle:nil];
            ViewController *vc = [sb instantiateViewControllerWithIdentifier:@"vc"];
            [_viewController.navigationController pushViewController:vc animated:YES];
        }

Cube transition animator

The cube transition animator cuts the view to half when transition completes. I can only repro this error in the initial transition.

CEHorizontalSwipeInteractionController popOnRightToLeft is within method

CEHorizontalSwipeInteractionController method's
wireToViewController:(UIViewController *)viewController forOperation:(CEInteractionOperation)operation

has popOnRightToLeft = YES within method. So, whatever I change back to YES. So, I need to change the initial code. I think it be better we remove this line.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.