All Projects → craftzdog → NRBlurryStepOutAnimatedTransitioning

craftzdog / NRBlurryStepOutAnimatedTransitioning

Licence: MIT license
tweetbot like modal view transitioning

Programming Languages

objective c
16641 projects - #2 most used programming language
ruby
36898 projects - #4 most used programming language

NRBlurryStepOutAnimatedTransitioning

A tweetbot 3 like modal view transitioning. This module is an animated transitioning class which applies blur effect to step-backed view while modal view is presenting.

Demo video

Screenshot01 Screenshot02

Installation

Just add NRBlurryStepOutAnimatedTransitioning.h,m into your project.

CocoaPods

Add below line into your Podfile:

pod 'NRBlurryStepOutAnimatedTransitioning', '~> 0.1.0'

Then, run $ pod install

Easy to use

In your header file, add UIViewControllerTransitioningDelegate protocol to your view controller class:

@interface NRPresentedViewController : UIViewController<UIViewControllerTransitioningDelegate>
@end

In your source file:

#import "NRBlurryStepOutAnimatedTransitioning.h"

-(void)showNewController;
{
    UIViewController* vc = [[YourModalViewController alloc] init];
    vc.transitioningDelegate = self;
    [self presentViewController:vc animated:YES completion:NULL];
}


#pragma mark - UIViewControllerTransitioningDelegate

- (id<UIViewControllerAnimatedTransitioning>)animationControllerForPresentedController:(UIViewController *)presented presentingController:(UIViewController *)presenting sourceController:(UIViewController *)source
{
    return [[NRBlurryStepOutAnimatedTransitioning alloc] initWithPresenting:YES];
}

- (id <UIViewControllerAnimatedTransitioning>)animationControllerForDismissedController:(UIViewController *)dismissed
{
    return [[NRBlurryStepOutAnimatedTransitioning alloc] initWithPresenting:NO];
}

Invoke -showNewController from somewhere you like. That's it :)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].