Skip to content

Easily add custom folding and page-flipping transitions to UIViews and UIViewControllers

Notifications You must be signed in to change notification settings

jberlana/MPFoldTransition

 
 

Repository files navigation

MPTransition

Update: MPTransition now comprises MPFoldTransition and MPFlipTransition

MPFoldTransition is a set of classes to add folding-style transitions to iOS 5 projects.
iPhone Fold
MPFlipTransition is a set of classes to add page-flipping transitions to iOS 5 projects.
iPhone Flip
I built it using ARC (and for the demo portion storyboards) strictly for convenience, so it uses iOS 5. I imagine the relevant code (minus the UIStoryboardSegue helper classes) could be easily ported to iOS 4.3 under ARC, or ported to iOS 4.0 with memory management inserted. (Hint: If you're porting to non-ARC, you'll need to retain [sourceView superView] in the init method.)

Features

  • Convenience methods to extend UIViewController to present/dismiss a view controller modally using fold/flip transitions
  • Convenience methods to extend UINavigationController to push/pop view controllers onto the navigation stack using fold/flip transitions
  • Convenience methods to transition between any 2 UIViewControllers or UIViews
  • 3 Custom UIStoryboardSegue subclasses to easily add folding/flipping transitions via Interface Builder in your storyboards
  • Fully customizable to adjust style, duration, timing curves, and completion action
  • Blocks-based: many methods include a completion block parameter following the pattern of block-based animations introduced in iOS 4.

Fold Styles

Currently there are 3 style bits that can be combined for 8 different styles.

  • Direction: Fold vs. Unfold
    Fold vs. Unfold
  • Mode: Normal vs. Cubic
    Normal vs. Cubic
  • Orientation: Vertical vs. Horizontal
    Vertical vs. Horizontal

Flip Styles

Currently there are 3 style bits that can be combined for 8 different styles.

  • Direction: Forward vs. Backward
    Forward vs. Backward
  • Orientation: Horizontal vs. Vertical
    Horizontal vs. Vertical
  • Perspective: Normal vs. Reverse
    Normal vs. Reverse

How To Use

See the "MPFoldTransition.h" (and "MPFlipTransition.h") header file(s) for methods and use the demo project as a reference. The Segue classes (under directory of the same name) are optional, only if you want to include storyboard support. Otherwise you just need the classes under the bottommost MPFoldTransition directory.

Licensing

Read Source Code License.rtf, but the gist is:

  • Anyone can use it for any type of project
  • All I ask for is attribution somewhere

Best,
Mark Pospesel

Website: http://markpospesel.com/
Contact: http://markpospesel.com/about
Twitter: http://twitter.com/mpospese
Hire Me: http://crazymilksoftware.com/

About

Easily add custom folding and page-flipping transitions to UIViews and UIViewControllers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published