Commit b65e553b53b5b59e86a8f1d7ad4ad2c5c63bbca1
1 parent
3c8a296e
no message
Showing
7 changed files
with
25 additions
and
0 deletions
CNLiveServices/Classes/Category/CNLiveCategoryServiceProtocol.h
| @@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
| 7 | // | 7 | // |
| 8 | 8 | ||
| 9 | #import <Foundation/Foundation.h> | 9 | #import <Foundation/Foundation.h> |
| 10 | +#import <UIKit/UIKit.h> | ||
| 10 | #import "BHServiceProtocol.h" | 11 | #import "BHServiceProtocol.h" |
| 11 | 12 | ||
| 12 | @protocol CNLiveCategoryServiceProtocol <NSObject, BHServiceProtocol> | 13 | @protocol CNLiveCategoryServiceProtocol <NSObject, BHServiceProtocol> |
CNLiveServices/Classes/Login/CNLiveLoginServiceProtocol.h
| @@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
| 7 | // | 7 | // |
| 8 | 8 | ||
| 9 | #import <Foundation/Foundation.h> | 9 | #import <Foundation/Foundation.h> |
| 10 | +#import <UIKit/UIKit.h> | ||
| 10 | #import "BHServiceProtocol.h" | 11 | #import "BHServiceProtocol.h" |
| 11 | 12 | ||
| 12 | @protocol CNLiveLoginServiceProtocol <NSObject, BHServiceProtocol> | 13 | @protocol CNLiveLoginServiceProtocol <NSObject, BHServiceProtocol> |
CNLiveServices/Classes/Manager/CNLivePageJumpManager.h
| @@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
| 7 | // | 7 | // |
| 8 | 8 | ||
| 9 | #import <Foundation/Foundation.h> | 9 | #import <Foundation/Foundation.h> |
| 10 | +#import <UIKit/UIKit.h> | ||
| 10 | 11 | ||
| 11 | NS_ASSUME_NONNULL_BEGIN | 12 | NS_ASSUME_NONNULL_BEGIN |
| 12 | 13 | ||
| @@ -16,6 +17,10 @@ NS_ASSUME_NONNULL_BEGIN | @@ -16,6 +17,10 @@ NS_ASSUME_NONNULL_BEGIN | ||
| 16 | + (void)jumpViewController:(UIViewController *)controller; | 17 | + (void)jumpViewController:(UIViewController *)controller; |
| 17 | + (void)jumpViewController:(UIViewController *)controller animated:(BOOL)animated; | 18 | + (void)jumpViewController:(UIViewController *)controller animated:(BOOL)animated; |
| 18 | 19 | ||
| 20 | +// back | ||
| 21 | ++ (void)backViewController; | ||
| 22 | ++ (void)backViewController:(BOOL)animated; | ||
| 23 | + | ||
| 19 | // push | 24 | // push |
| 20 | + (void)pushViewController:(UIViewController *)controller; | 25 | + (void)pushViewController:(UIViewController *)controller; |
| 21 | + (void)pushViewController:(UIViewController *)controller animated:(BOOL)animated; | 26 | + (void)pushViewController:(UIViewController *)controller animated:(BOOL)animated; |
CNLiveServices/Classes/Manager/CNLivePageJumpManager.m
| @@ -42,6 +42,21 @@ | @@ -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 | #pragma mark - Push | 60 | #pragma mark - Push |
| 46 | + (void)pushViewController:(UIViewController *)controller{ | 61 | + (void)pushViewController:(UIViewController *)controller{ |
| 47 | [self pushViewController:controller animated:YES]; | 62 | [self pushViewController:controller animated:YES]; |
CNLiveServices/Classes/Mine/CNLiveMineServiceProtocol.h
| @@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
| 7 | // | 7 | // |
| 8 | 8 | ||
| 9 | #import <Foundation/Foundation.h> | 9 | #import <Foundation/Foundation.h> |
| 10 | +#import <UIKit/UIKit.h> | ||
| 10 | #import "BHServiceProtocol.h" | 11 | #import "BHServiceProtocol.h" |
| 11 | 12 | ||
| 12 | @protocol CNLiveMineServiceProtocol <NSObject, BHServiceProtocol> | 13 | @protocol CNLiveMineServiceProtocol <NSObject, BHServiceProtocol> |
CNLiveServices/Classes/NetHome/CNLiveNetHomeServiceProtocol.h
| @@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
| 7 | // | 7 | // |
| 8 | 8 | ||
| 9 | #import <Foundation/Foundation.h> | 9 | #import <Foundation/Foundation.h> |
| 10 | +#import <UIKit/UIKit.h> | ||
| 10 | #import "BHServiceProtocol.h" | 11 | #import "BHServiceProtocol.h" |
| 11 | 12 | ||
| 12 | @protocol CNLiveNetHomeServiceProtocol <NSObject, BHServiceProtocol> | 13 | @protocol CNLiveNetHomeServiceProtocol <NSObject, BHServiceProtocol> |
CNLiveServices/Classes/Service/CNLiveServiceServiceProtocol.h
| @@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
| 7 | // | 7 | // |
| 8 | 8 | ||
| 9 | #import <Foundation/Foundation.h> | 9 | #import <Foundation/Foundation.h> |
| 10 | +#import <UIKit/UIKit.h> | ||
| 10 | #import "BHServiceProtocol.h" | 11 | #import "BHServiceProtocol.h" |
| 11 | 12 | ||
| 12 | @protocol CNLiveServiceServiceProtocol <NSObject, BHServiceProtocol> | 13 | @protocol CNLiveServiceServiceProtocol <NSObject, BHServiceProtocol> |