feat:rename protocol to delegate
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
//
|
||||
// Created by pengfei.zhou on 2019/11/25.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "DoricNavigatorProtocol.h"
|
||||
|
||||
@interface DoricDefaultNavigator : NSObject <DoricNavigatorProtocol>
|
||||
- (instancetype)initWithNavigationController:(UINavigationController *)navigationController;
|
||||
@end
|
@@ -1,29 +0,0 @@
|
||||
//
|
||||
// Created by pengfei.zhou on 2019/11/25.
|
||||
//
|
||||
|
||||
#import "DoricDefaultNavigator.h"
|
||||
#import "DoricViewController.h"
|
||||
|
||||
@interface DoricDefaultNavigator ()
|
||||
@property(nonatomic, weak) UINavigationController *navigationController;
|
||||
@end
|
||||
|
||||
@implementation DoricDefaultNavigator
|
||||
- (instancetype)initWithNavigationController:(UINavigationController *)navigationController {
|
||||
if (self = [super init]) {
|
||||
_navigationController = navigationController;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)push:(NSString *)scheme alias:(NSString *)alias animated:(BOOL)animated {
|
||||
DoricViewController *viewController = [[DoricViewController alloc] initWithScheme:scheme alias:alias];
|
||||
[self.navigationController pushViewController:viewController animated:animated];
|
||||
}
|
||||
|
||||
- (void)pop:(BOOL)animated {
|
||||
[self.navigationController popViewControllerAnimated:animated];
|
||||
}
|
||||
|
||||
@end
|
@@ -19,8 +19,8 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@protocol DoricNavigatorProtocol <NSObject>
|
||||
- (void)push:(NSString *)scheme alias:(NSString *)alias animated:(BOOL)animated;
|
||||
@protocol DoricNavigatorDelegate <NSObject>
|
||||
- (void)doric_navigator_push:(NSString *)scheme alias:(NSString *)alias animated:(BOOL)animated;
|
||||
|
||||
- (void)pop:(BOOL)animated;
|
||||
- (void)doric_navigator_pop:(BOOL)animated;
|
||||
@end
|
Reference in New Issue
Block a user