-
Notifications
You must be signed in to change notification settings - Fork 0
/
OldStyleNavigationControllerAnimatedTransition.h
36 lines (26 loc) · 1.32 KB
/
OldStyleNavigationControllerAnimatedTransition.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// SXTNavigationControllerAnimatedTransition.h
//
//
// Created by Davide Di Stefano on 16/09/13.
// Copyright (c) 2013 ReturnService. All rights reserved.
//
#import <Foundation/Foundation.h>
/*
This class implements the UIViewControllerAnimatedTransitioning protocol and it lets you use the old style push and pop animation (before iOS7) in which the two views scrolls together. Useful for UINavigationController with a transparent background in which the views overlaps with the iOS7 animation style.
How to use:
Set your viewcontroller as UINavigationController delegate:
self.navigationController.delegate = self;
And Implement this method:
-(id<UIViewControllerAnimatedTransitioning>)navigationController:
(UINavigationController *)navigationController animationControllerForOperation:(UINavigationControllerOperation)operation fromViewController:(UIViewController *)fromVC toViewController:(UIViewController *)toVC
{
OldStyleNavigationControllerAnimatedTransition * animation = [[OldStyleNavigationControllerAnimatedTransition alloc] init];
animation.operation = operation;
return animation;
}
*/
@interface OldStyleNavigationControllerAnimatedTransition : NSObject <UIViewControllerAnimatedTransitioning>
// push or pop
@property (nonatomic, assign) UINavigationControllerOperation operation;
@end