dcm

DCModalSegue

A custom segue which makes a pushed back modal presenting animation.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

322

Maintenance

Last Commit

8yrs ago

Contributors

2

Package

Dependencies

0

License

MIT

Categories

Readme

DCModalSegue

DCModalSegue is a subclass of UIStoryboardSegue which make a slight pushed back animation when presented. The presenting animation is inspired by Gmail App and Sunrise Calendar.

Screencast

DCModalSegue GIF Demo

Installation

With [CocoaPods] (http://cocoapods.org/), just add line below to your Podfile then pod install,

pod 'DCModalSegue'

Otherwise, download manually and then drag DCModalSegue folder to your Xcode project.

Finally, ensure QuartzCore.framework is added to your project.

Usage

Create segue in storyboard:

  1. Like normal storyboard segue, control drag from one scene (or a control) to the scene you want to present.
  2. Select the segue type as custom.
  3. Enter DCModalSegue in the Segue Class field inside the inspector.
  4. That's it :-)

To dismiss the presented view controller, use [self.presentingViewController dismissViewControllerAnimated:YES completion:nil]; instead of [self dismissViewControllerAnimated:YES completion:nil];

There is also an unwind segue action created for you (thus no code is needed to dismiss the controller), you can set up the dismiss action by control drag to the exit icon (see below) and select the action modalDonePresenting:.

Control Drag to Exit

Notice

  • ARC only
  • Unwind segue is only provided in iOS 6
  • Now support only portrait iPhone

Contributions

As an experimental project, there are a lot could be done better. So feel free to fork or submit an issue. :-)

Thanks

Some ideas from KNSemiModalViewController and GC3DFlipTransitionStyleSegue.

Contact

Created by David Chang.

License

It's MIT Licese. See file LICENSE for more info.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial