GithubHelp home page GithubHelp logo

wentaozone / mpfoldtransition Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mpospese/mpfoldtransition

0.0 2.0 0.0 175 KB

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

Home Page: http://markpospesel.com/2012/05/07/mpfoldtransition/

mpfoldtransition's Introduction

MPTransition

Update: MPTransition now comprises MPFoldTransition and MPFlipTransition

Update 2: For a touch gesture-enabled container controller with page-flipping (not just a transition), see MPFlipViewController

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

Requirements

  • Xcode 4.4 or higher
  • LLVM compiler
  • iOS 5 or higher

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

Support, bugs and feature requests

There is absolutely no support offered with this component. You're on your own! If you want to submit a feature request, please do so via the issue tracker on github.

If you want to submit a bug report, please also do so via the issue tracker, including a diagnosis of the problem and a suggested fix (in code). If you're using MPTransition, you're a developer - so I expect you to do your homework and provide a fix along with each bug report. You can also submit pull requests or patches.

Please don't submit bug reports without fixes!

(The preceding blurb provided courtesy of the legendary Matt Gemmell)

Best,
Mark Pospesel

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

mpfoldtransition's People

Contributors

mpospese avatar cbowns avatar

Watchers

James Cloos avatar 开水白菜 avatar

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.