forked from ptshih/PSNavigationController
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPSNavigationController.h
66 lines (51 loc) · 2.58 KB
/
PSNavigationController.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//
// PSNavigationController.h
// OSnap
//
// Created by Peter Shih on 12/19/11.
// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
/**
This class does NOT manage a shared navigation bar.
It is the responsibility of the view controller to present a navigation bar.
PSViewController has an optional PSNavigationBar property that will add one.
iOS5 only, uses view containment
*/
typedef enum {
PSNavigationControllerDirectionLeft = 1,
PSNavigationControllerDirectionRight = 2,
PSNavigationControllerDirectionUp = 3,
PSNavigationControllerDirectionDown = 4
} PSNavigationControllerDirection;
@protocol PSNavigationControllerDelegate;
@class PSViewController;
@interface PSNavigationController : UIViewController <UIGestureRecognizerDelegate> {
}
@property (nonatomic, retain) UIView *overlayView;
@property (nonatomic, assign) id <PSNavigationControllerDelegate> delegate;
@property (nonatomic, assign) UIViewController *disappearingViewController;
@property (nonatomic, assign) UIViewController *topViewController;
@property (nonatomic, assign) UIViewController *rootViewController;
@property (nonatomic, retain) NSMutableArray *viewControllers;
/**
Convenience initializer
*/
- (id)initWithRootViewController:(UIViewController *)rootViewController;
/**
Push and Pop
*/
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated;
- (void)pushViewController:(UIViewController *)viewController direction:(PSNavigationControllerDirection)direction animated:(BOOL)animated;
- (UIViewController *)popViewControllerAnimated:(BOOL)animated;
- (UIViewController *)popViewControllerWithDirection:(PSNavigationControllerDirection)direction animated:(BOOL)animated;
- (NSArray *)popToViewController:(UIViewController *)viewController animated:(BOOL)animated;
- (NSArray *)popToRootViewControllerAnimated:(BOOL)animated;
@end
@protocol PSNavigationControllerDelegate <NSObject>
@optional
- (void)psNavigationController:(PSNavigationController *)psNavigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated;
- (void)psNavigationController:(PSNavigationController *)psNavigationController didShowViewController:(UIViewController *)viewController animated:(BOOL)animated;
- (void)psNavigationController:(PSNavigationController *)psNavigationController willHideViewController:(UIViewController *)viewController animated:(BOOL)animated;
- (void)psNavigationController:(PSNavigationController *)psNavigationController didHideViewController:(UIViewController *)viewController animated:(BOOL)animated;
@end