This repository was archived by the owner on Jul 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCustomNavigationController.h
More file actions
79 lines (56 loc) · 2.45 KB
/
CustomNavigationController.h
File metadata and controls
79 lines (56 loc) · 2.45 KB
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
67
68
69
70
71
72
73
74
75
76
77
78
79
//
// CustomNavigationController.h
// WOD
//
// Created by Casey Marshall on 2/3/11.
// Copyright 2011 Modal Domains. All rights reserved.
//
#import <UIKit/UIKit.h>
// This class is a reimplementation of UINavigationController, reimplemented
// here so it works better when embedded in another view controller.
@class CustomNavigationController;
@protocol CustomNavigationControllerDelegate <NSObject>
- (void) navigationController: (CustomNavigationController *) controller
willShowViewController: (UIViewController *) viewController
animated: (BOOL) animated;
- (void) navigationController: (CustomNavigationController *) controller
didShowViewController: (UIViewController *) viewController
animated: (BOOL) animated;
@end
typedef enum CustomNavigationControllerAnimation
{
// No animation.
CustomNavigationControllerAnimationNone = 0,
// The new view slides in from the top.
CustomNavigationControllerAnimationTop = 1,
// The new view slides in from the bottom.
CustomNavigationControllerAnimationBottom = 2,
// The new view slides in from the left.
CustomNavigationControllerAnimationLeft = 3,
// The new view slides in from the right.
CustomNavigationControllerAnimationRight = 4,
// The default animation for the transition.
CustomNavigationControllerAnimationDefault = 5
} CustomNavigationControllerAnimation;
@interface CustomNavigationController : UIViewController <UINavigationBarDelegate>
{
UINavigationBar *navigationBar;
UIView *contentView;
NSMutableArray *viewControllers;
id<CustomNavigationControllerDelegate> delegate;
}
@property (retain, nonatomic) IBOutlet UINavigationBar *navigationBar;
@property (retain, nonatomic) IBOutlet UIView *contentView;
@property (retain, nonatomic) IBOutlet id<CustomNavigationControllerDelegate> delegate;
- (id) initWithRootViewController: (UIViewController *) viewController;
- (void) setViewControllers: (NSArray *) vc
withAnimation: (CustomNavigationControllerAnimation) animation;
- (void) setViewControllers:(NSArray *)vc animated: (BOOL) animated;
- (void) pushViewController: (UIViewController *) viewController
withAnimation: (CustomNavigationControllerAnimation) animation;
- (void) pushViewController: (UIViewController *) viewController
animated: (BOOL) animated;
- (void) popViewControllerWithAnimation: (CustomNavigationControllerAnimation) animation;
- (void) popViewControllerAnimated: (BOOL) animated;
- (IBAction) backItemTapped: (id) sender;
@end