Commit d36e88c96b47922133cef8c2c5873181f216ec56
1 parent
b65e553b
no message
Showing
2 changed files
with
12 additions
and
0 deletions
CNLiveServices/Classes/Manager/CNLivePageJumpManager.h
| ... | ... | @@ -12,6 +12,11 @@ |
| 12 | 12 | NS_ASSUME_NONNULL_BEGIN |
| 13 | 13 | |
| 14 | 14 | @interface CNLivePageJumpManager : NSObject |
| 15 | +// 获取跟控制器 | |
| 16 | ++ (UIViewController *)getRootController; | |
| 17 | + | |
| 18 | +// 获取导航控制器 | |
| 19 | ++ (UINavigationController *)getNavigationController; | |
| 15 | 20 | |
| 16 | 21 | // jump |
| 17 | 22 | + (void)jumpViewController:(UIViewController *)controller; | ... | ... |
CNLiveServices/Classes/Manager/CNLivePageJumpManager.m
| ... | ... | @@ -11,8 +11,15 @@ |
| 11 | 11 | @interface CNLivePageJumpManager () |
| 12 | 12 | |
| 13 | 13 | @end |
| 14 | + | |
| 14 | 15 | @implementation CNLivePageJumpManager |
| 15 | 16 | #pragma mark - 获取跟控制器 |
| 17 | ++ (UIViewController *)getRootController{ | |
| 18 | + UIViewController *vc = [UIApplication sharedApplication].delegate.window.rootViewController; | |
| 19 | + return vc; | |
| 20 | +} | |
| 21 | + | |
| 22 | +#pragma mark - 获取导航控制器 | |
| 16 | 23 | + (UINavigationController *)getNavigationController{ |
| 17 | 24 | UIViewController *vc = [UIApplication sharedApplication].delegate.window.rootViewController; |
| 18 | 25 | if ([vc isKindOfClass:[UINavigationController class]]){ | ... | ... |