Latest 0.0.1
License MIT
Platforms ios 7.0, requires ARC
Frameworks Foundation, UIKit

The example of iOS Transition animation for Modal ViewController.

alt tag


iOS 7.0+


Using CocoaPods:

pod 'ios-modal-transition', '~> 0.0.1'


First step, you should implement UIViewControllerTransitioningDelegate protocol:

#import <ios-modal-transition/ALModalTrasition.h>

// This method will be called before presentation of modal window
- (id<UIViewControllerAnimatedTransitioning>)animationControllerForPresentedController:(UIViewController *)presented
                                                                  presentingController:(UIViewController *)presenting
                                                                      sourceController:(UIViewController *)source {

return [[ALModalTrasition alloc]initShowWithBackgroundColor:[UIColor blackColor]
                                                 edgeInsets:UIEdgeInsetsMake(20, 10, 10, 10)

// This method will be called before close of modal window
- (id<UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed {

return [[ALModalTrasition alloc]initHideWithAnimationDuration:0.3];


Implement the modal presentation:

// Get View Controller from the Storyboard
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main"
                                                         bundle: nil];

UIViewController *viewController = (UIViewController *)[mainStoryboard instantiateViewControllerWithIdentifier:@"modalViewController"];

// Change modal presentation style
viewController.modalPresentationStyle = UIModalPresentationCustom;

// Set delegate to class, where you've implemented UIViewControllerTransitioningDelegate protocol
viewController.transitioningDelegate = self;

// Show modal view
[self presentViewController:viewController animated:YES completion:nil];



Latest podspec

    "name": "ios-modal-transition",
    "version": "0.0.1",
    "summary": "Simple custom iOS Transition animation for Modal ViewController.",
    "description": "This is the simple custom iOS Transition animation for Modal ViewController",
    "homepage": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": "Andrey Lazutkin",
    "platforms": {
        "ios": "7.0"
    "source": {
        "git": "",
        "tag": "0.0.1"
    "source_files": "ios-modal-transition-example/Classes/*.{h,m}",
    "public_header_files": "ios-modal-transition-example/Classes/*.h",
    "frameworks": [
    "requires_arc": true

Pin It on Pinterest

Share This