Commit b65e553b53b5b59e86a8f1d7ad4ad2c5c63bbca1
1 parent
3c8a296e
no message
Showing
7 changed files
with
25 additions
and
0 deletions
CNLiveServices/Classes/Category/CNLiveCategoryServiceProtocol.h
CNLiveServices/Classes/Login/CNLiveLoginServiceProtocol.h
CNLiveServices/Classes/Manager/CNLivePageJumpManager.h
| ... | ... | @@ -7,6 +7,7 @@ |
| 7 | 7 | // |
| 8 | 8 | |
| 9 | 9 | #import <Foundation/Foundation.h> |
| 10 | +#import <UIKit/UIKit.h> | |
| 10 | 11 | |
| 11 | 12 | NS_ASSUME_NONNULL_BEGIN |
| 12 | 13 | |
| ... | ... | @@ -16,6 +17,10 @@ NS_ASSUME_NONNULL_BEGIN |
| 16 | 17 | + (void)jumpViewController:(UIViewController *)controller; |
| 17 | 18 | + (void)jumpViewController:(UIViewController *)controller animated:(BOOL)animated; |
| 18 | 19 | |
| 20 | +// back | |
| 21 | ++ (void)backViewController; | |
| 22 | ++ (void)backViewController:(BOOL)animated; | |
| 23 | + | |
| 19 | 24 | // push |
| 20 | 25 | + (void)pushViewController:(UIViewController *)controller; |
| 21 | 26 | + (void)pushViewController:(UIViewController *)controller animated:(BOOL)animated; | ... | ... |
CNLiveServices/Classes/Manager/CNLivePageJumpManager.m
| ... | ... | @@ -42,6 +42,21 @@ |
| 42 | 42 | } |
| 43 | 43 | } |
| 44 | 44 | |
| 45 | +#pragma mark - back | |
| 46 | ++ (void)backViewController{ | |
| 47 | + [self backViewController:YES]; | |
| 48 | +} | |
| 49 | ++ (void)backViewController:(BOOL)animated{ | |
| 50 | + UINavigationController *nav = [self getNavigationController]; | |
| 51 | + if(nav){ | |
| 52 | + [nav popViewControllerAnimated:animated]; | |
| 53 | + } | |
| 54 | + else{ | |
| 55 | + UIViewController *vc = [UIApplication sharedApplication].delegate.window.rootViewController; | |
| 56 | + [vc dismissViewControllerAnimated:animated completion:nil]; | |
| 57 | + } | |
| 58 | +} | |
| 59 | + | |
| 45 | 60 | #pragma mark - Push |
| 46 | 61 | + (void)pushViewController:(UIViewController *)controller{ |
| 47 | 62 | [self pushViewController:controller animated:YES]; | ... | ... |
CNLiveServices/Classes/Mine/CNLiveMineServiceProtocol.h
CNLiveServices/Classes/NetHome/CNLiveNetHomeServiceProtocol.h
CNLiveServices/Classes/Service/CNLiveServiceServiceProtocol.h