feat:move navigator to another class for iOS

This commit is contained in:
pengfei.zhou
2019-11-25 10:50:27 +08:00
parent f750eb6cae
commit 844d44a6f0
8 changed files with 48 additions and 20 deletions

View File

@@ -24,9 +24,7 @@ @implementation DoricPanel
- (void)config:(NSString *)script alias:(NSString *)alias {
self.doricContext = [[[DoricContext alloc] initWithScript:script source:alias] also:^(DoricContext *it) {
if ([self.parentViewController conformsToProtocol:@protocol(DoricNavigatorProtocol)]) {
it.navigator = (id <DoricNavigatorProtocol>) self.parentViewController;
}
it.navigator = [[DoricDefaultNavigator alloc] initWithNavigationController:self.navigationController];
[it.rootNode setupRootView:[[DoricStackView new] also:^(DoricStackView *it) {
it.width = self.view.width;
it.height = self.view.height;