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
//
// UIViewController+LogicController.h
// XFFruit
//
// Created by Xummer on 15/4/3.
// Copyright (c) 2015年 Xummer. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIViewController (LogicController)
- (UIImage *)getViewControllerImage:(CGSize)imageSize;
// Navigation
- (BOOL)isCurrentViewController;
- (void)onBackButtonClicked;
- (UIViewController *)getViewControllerAtIndex:(NSInteger)iIndex;
- (void)PushViewController:(UIViewController *)viewController animated:(BOOL)bAnimated;
- (UIViewController *)PopViewControllerAnimated:(BOOL)bAnimated;
- (NSArray *)PopToViewController:(UIViewController *)viewController animated:(BOOL)bAnimated;
- (NSArray *)PopToRootViewControllerAnimated:(BOOL)bAnimated;
- (NSArray *)PopToViewControllerWithClass:(Class)vcClass animated:(BOOL)bAnimated;
- (NSArray *)PopToViewControllerAtIndex:(NSInteger)index animated:(BOOL)bAnimated;
@end
@interface UIViewController (ModalView)
//- (void)releasePopoverController:(id)controller;
//- (void)popoverControllerDidDismissPopover:(id)popoverController;
- (void)DismissMyselfAnimated:(BOOL)bAnimated;
- (void)DismissModalViewControllerAnimated:(BOOL)bAnimated;
- (void)PresentModalViewController:(UIViewController *)viewControllerToPresent animated:(BOOL)bAnimated;
- (void)PresentViewControllerInNewNavigation:(UIViewController *)viewControllerToPresent animated:(BOOL)bAnimated completion:(void (^)(void))completion;
@end
@interface UIViewController (margin)
- (void)setLeftBarButtonItem:(UIBarButtonItem *)item;
- (UIBarButtonItem *)leftBarButtonItem;
- (void)setRightBarButtonItem:(UIBarButtonItem *)item;
- (UIBarButtonItem *)rightBarButtonItem;
- (void)setLeftBarButtonItems:(NSArray *)items;
- (void)setRightBarButtonItems:(NSArray *)items;
- (UIBarButtonItem *)addLeftBarBtnItemWithName:(NSString *)btnName action:(SEL)selector;
- (UIBarButtonItem *)addRightBarBtnItemWithName:(NSString *)btnName action:(SEL)selector;
@end