All Projects → cocoatoucher → Aicustomviewcontrollertransition

cocoatoucher / Aicustomviewcontrollertransition

Licence: mit
Easy and tidy way for creating custom UIViewController transitions for iOS

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Aicustomviewcontrollertransition

Transition
Easy interactive interruptible custom ViewController transitions
Stars: ✭ 2,566 (+1873.85%)
Mutual labels:  transition, custom, interactive, viewcontroller
SPLarkController
Custom transition between controllers. Settings controller for your iOS app.
Stars: ✭ 967 (+643.85%)
Mutual labels:  custom, transition, uiviewcontroller
Splarkcontroller
Custom transition between controllers. Settings controller for your iOS app.
Stars: ✭ 693 (+433.08%)
Mutual labels:  transition, custom, uiviewcontroller
Showoff
Don't just present; interact with your audience!
Stars: ✭ 879 (+576.15%)
Mutual labels:  presentation, presenter, interactive
Presentr
iOS let's you modally present any view controller, but if you want the presented view controller to not cover the whole screen or modify anything about its presentation or transition you have to use the Custom View Controller Presentation API's.
Stars: ✭ 2,816 (+2066.15%)
Mutual labels:  presentation, transition
Djsemimodalviewcontroller
Simple semi modal presentation dialog with stacked content
Stars: ✭ 137 (+5.38%)
Mutual labels:  presentation, uiviewcontroller
presenter
Easy class decoration.
Stars: ✭ 13 (-90%)
Mutual labels:  presentation, presenter
Showtime
The easiest way to show off your iOS taps and gestures for demos and videos.
Stars: ✭ 281 (+116.15%)
Mutual labels:  presentation, gesture
Lgsidemenucontroller
iOS view controller which manages left and right side views
Stars: ✭ 1,856 (+1327.69%)
Mutual labels:  viewcontroller, uiviewcontroller
SHTransition
SHTransition is a simple library for viewcontroller transition animation in swift.
Stars: ✭ 35 (-73.08%)
Mutual labels:  transition, viewcontroller
Hyawesometransition
Custom transition between viewcontrollers
Stars: ✭ 368 (+183.08%)
Mutual labels:  transition, viewcontroller
Presenterkit
Custom presenters and better view controller presentation for iOS
Stars: ✭ 520 (+300%)
Mutual labels:  presentation, viewcontroller
Cardsholder
Demonstration of complex interface layouts using child view controllers in iOS 🦾
Stars: ✭ 24 (-81.54%)
Mutual labels:  transition, interactive
Atgmediabrowser
Image slide-show viewer with multiple predefined transition styles, with ability to create new transitions with ease.
Stars: ✭ 186 (+43.08%)
Mutual labels:  transition, custom
Cpcollectionviewkit
Interesting UICollectionView layouts and transitions
Stars: ✭ 140 (+7.69%)
Mutual labels:  transition, custom
Sheet
📑 Actionsheet with navigation features such as the Flipboard App
Stars: ✭ 264 (+103.08%)
Mutual labels:  transition, custom
Pympress
Pympress is a simple yet powerful PDF reader designed for dual-screen presentations
Stars: ✭ 450 (+246.15%)
Mutual labels:  presentation, presenter
Beamerpresenter
Simple dual screen pdf presentation software
Stars: ✭ 30 (-76.92%)
Mutual labels:  presentation, presenter
Swipeablecards
Demonstration of draggable transition for UIViewController with swipeable UICollectionView cells inside.
Stars: ✭ 52 (-60%)
Mutual labels:  transition, interactive
Slidr
add some slide effects.
Stars: ✭ 1,560 (+1100%)
Mutual labels:  transition

AICustomViewControllerTransition

Easy and tidy way for creating custom UIViewController transitions for iOS

Create view controller transitions with no limits and without the complexity of implementing UIViewControllerAnimatedTransitioning protocol or subclassing UIPercentDrivenInteractiveTransition. You just need to use provided transitioningDelegate closure callbacks and provide your UIView animation code.

Platform Language License

Drag Down icon used in examples and screenshots is by IconMafia from thenounproject.com (https://thenounproject.com/search/?q=drag&i=463918)

##Requirements

  • iOS 8.1+
  • Xcode 8 (Use pod version 1.0.3 for Xcode 7)

Installation

Embedded frameworks require a minimum deployment target of iOS 8.1

To use with a project targeting iOS 7, or if you don't want to use CocoaPods you must include the AICustomViewControllerTransition.swift source file directly in your project.


Usage

1. Create a custom transitioning delegate object

  • SimpleTransitioningDelegate

If you don't want your transition to be interactive

let mySimpleTransitioningDelegate = SimpleTransitioningDelegate()
  • InteractiveTransitioningDelegate

If you want your transition to be interactive as well. Includes all the functionality of SimpleTransitioningDelegate

let myInteractiveTransitioningDelegate = InteractiveTransitioningDelegate()

2. Assign animation closures to your transitioning delegate

  • transitionPresent

Animate transition for presenting your modal view controller. See SimpleTransitionViewController example in the Example project.

mySimpleTransitioningDelegate.transitionPresent = { [weak self] (fromViewController: UIViewController, toViewController: UIViewController, containerView: UIView, transitionType: TransitionType, completion: @escaping () -> Void) in

	UIView.animate(withDuration: animationDuration, animations: {
		// Your custom presentation animation here
		// Use provided viewController views to animate
	}, completion: { (finished) in
		// Do't forget to execute completion closure
		completion()
	})
}
  • transitionDismiss

Animate transition for dismissing your modal view controller. See SimpleTransitionViewController example in the Example project.

mySimpleTransitioningDelegate.transitionDismiss = { [weak self] (fromViewController: UIViewController, toViewController: UIViewController, containerView: UIView, transitionType: TransitionType, completion: @escaping () -> Void) in

	UIView.animate(withDuration: animationDuration, animations: {
		// Your custom dismissal animation here
		// Use provided viewController views to animate
	}, completion: { (finished) in
		completion()
	})
}
  • transitionPercentPresent

Animate percent driven interactive transition for presenting your modal view controller. See PanToViewTransitionViewController and ExpandingCellsTableViewController examples in the Example project.

myInteractiveTransitioningDelegate.transitionPercentPresent = {[weak self] (fromViewController: UIViewController, toViewController: UIViewController, percentage: CGFloat, containerView: UIView) in
	// Animate your view controllers using provided percentage
	// Because the transition is progressive, you probably don't need an animation block here
}
  • transitionPercentDismiss

Animate percent driven interactive transition for dismissing your modal view controller. See PanToViewTransitionViewController and ExpandingCellsTableViewController examples in the Example project.

myInteractiveTransitioningDelegate.transitionPercentDismiss = {[weak self] (fromViewController: UIViewController, toViewController: UIViewController, percentage: CGFloat, containerView: UIView) in
	// Animate your view controllers using provided percentage
	// Because the transition is progressive, you probably don't need an animation block here
}

3. Begin, update and finalize a percent driven interactive transition

Use below methods if you are using an InteractiveTransitioningDelegate as your transitioning delegate. See PanToViewTransitionViewController and ExpandingCellsTableViewController examples in the Example project.

  • beginPresenting(viewController:fromViewController:) or beginDismissing(viewController:)

Begin presenting your modal view controller, usually in the callback method for a gesture recognizer that your user interacts with.

myInteractiveTransitioningDelegate.beginPresenting(viewController:myModalViewController, fromViewController:self)
  • update(_:)

Update the percentage of your transition, usually in the callback method for a gesture recognizer that your user interacts with.

myInteractiveTransitioningDelegate.update(percentage)
  • finalizeInteractiveTransition(isTransitionCompleted:)

End presenting or dismissing an interactive transition.

myInteractiveTransitioningDelegate.finalizeInteractiveTransition(isTransitionCompleted:true)

4. Present your view controller as usual

If you are not presenting your view controller in an interactive way, present your view controller as usual. Even if you are using an InteractiveTransitioningDelegate you can still choose to present or dismiss your view controller automatically without a progressive interaction from user, e.g. user taps the button only once. See PanToViewTransitionViewController in Example project.

myModalViewController.modalPresentationStyle = .Custom
myModalViewController.transitioningDelegate = myInteractiveTransitioningDelegate //or mySimpleTransitioningDelegate
self.presentViewController(self.detailViewController, animated: true, completion: nil)

Documentation

http://cocoadocs.org/docsets/AICustomViewControllerTransition/

License

AICustomViewControllerTransition is released under the MIT license. See LICENSE for details.

youtube, fancy

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].