Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

A simple project which shows how to pull off custom view controller transitions.

License

NotificationsYou must be signed in to change notification settings

DreamingInBinary/Custom-ViewController-Transitions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project explains and shows how to make custom view controller transitions in the most simple way possible. Each example builds off of each other.

Objects you make

  1. Transitioning delegate (Required)An object whose sole job is to vend either custom animators, presentationcontrollers, interactive animators or all of those to UIKit. Setting a custom transitioning delegate for a controllers'transitioningDelegate property is what tells UIKit you want to perform acustom controller transition.

  2. Animatoror both an Animator and Interactive Animator (Optional)This decides the duration of the custom transition and performs the actualanimations of the presented view during both presentation and dismissal. It doesnot decide the final frame of the presented view. Presentation controllers do.If it an interactive animator is created, it's only job is to calculate how muchof the transition has been completed.

  3. Presentation Controller (Optional)This manages chrome outside of the presented or presentingview controllers and can animate those, such as a dimmer view. It also decidesthe final size of the presented view controller's view. It also can respondto changes occur in the app’s environment.

Objects UIKit makes

  1. Tranistion ContextContains all key components of the transition, like to the to and from view controllers.

  2. Transition CoordinatorUsed to hook into transitions and their animations to perform any other animations orchanges on existing controllers. For example, if you wanted to animate the deselectionof a table row in a root view controller on a navigation stack, you'd hook into the controller'stransition coordinator to animate alongside a popped controller's presentation and dismissal.Much the same way, a presentation controller animates chrome using the presented controller'stransition coordinator too.

Performing the Custom Transition

  1. Initialize the view controller to be presented.
  2. Assign your transitioning delegate to the controller’s transitioningDelegate property. Using it, return either2a) Custom animator or interactive animator.2b) A custom presentation controller. Requires that the controller's modal presentation style is set to custom.2c) Or both.
  3. Call presentViewController:animated:completion.

About

A simple project which shows how to pull off custom view controller transitions.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp