A drop-in replacement for UIPercentDrivenInteractiveTransition for use in custom container view cont...
The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:
AWPercentDrivenInteractiveTransitionis a drop-in replacement for
UIPercentDrivenInteractiveTransitionfor use in custom container view controllers.
Why do you need it? Because Apples own
UIPercentDrivenInteractiveTransitioncalls undocumented methods on your custom
Note that this class can be used with UIKits standard container view controllers such as
UITabBarControllerand also for presenting modal view controllers.
0.2.0 - Added support for changing
completionSpeed0.1.0 - Basic functionality implemented, usable for a majority of cases
completionSpeedcan't be changed from 1.0~~ (fixed in 0.2.0)
completionCurvecan't be changed from
UIViewControllerTransitionCoordinator(for animating other views along transition)
CocoaPods is the recommended way to add AWPercentDrivenInteractiveTransition to your project.
pod 'AWPercentDrivenInteractiveTransition', '~> 0.1'
Alternatively you can directly add the
AWPercentDrivenInteractiveTransition.msource files to your project.
AWPercentDrivenInteractiveTransition.monto your project (use the "Product Navigator view"). Make sure to select Copy items when asked if you extracted the code archive outside of your project.
If you don't want to compile my code all the time, there's an Xcode project in the
libfolder which generates a static
libAWPercentDrivenInteractiveTransition.alibrary file you can include in your project. Just remember to include the original
LICENCEfile in your source code.
Use as you would do with a regular
UIPercentDrivenInteractiveTransition. Either by letting your custom interaction controller subclass
AWPercentDrivenInteractiveTransitionor by having an instance and manually call the
The only difference is that you need to set the
animatorproperty with a
UIViewControllerAnimatedTransitioningobject before starting an interactive transition.
This is what the standard
UIPercentDrivenInteractiveTransitiondoes by calling private methods on your
There's also a convinience initializer called
initWithAnimator:that sets the animator property directly.
If you wanna se a demo of this drop-in replacement class in action, check out my blog post on Interactive Custom Container View Controller Transitions.
This code is distributed under the terms and conditions of the MIT license.