From 31cfdd239f00831e228d38908225eb0a4b06133d Mon Sep 17 00:00:00 2001 From: "pengfei.zhou" Date: Mon, 23 Dec 2019 19:33:32 +0800 Subject: [PATCH] iOS use DoricViewController --- doric-iOS/Example/Example/ViewController.m | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/doric-iOS/Example/Example/ViewController.m b/doric-iOS/Example/Example/ViewController.m index 080e1c87..3fabcfa0 100644 --- a/doric-iOS/Example/Example/ViewController.m +++ b/doric-iOS/Example/Example/ViewController.m @@ -76,17 +76,12 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath return; } NSString *file = self.demoFilePaths[(NSUInteger) indexPath.row]; - if ([file containsString:@"NavigatorDemo"]) { - DoricViewController *doricViewController = [[DoricViewController alloc] - initWithScheme:[NSString stringWithFormat:@"assets://src/%@", file] - alias:self.demoFilePaths[(NSUInteger) indexPath.row] - extra:nil - ]; - [self.navigationController pushViewController:doricViewController animated:NO]; - } else { - DemoVC *demoVC = [[DemoVC alloc] initWithPath:file]; - [self.navigationController pushViewController:demoVC animated:NO]; - } + DoricViewController *doricViewController = [[DoricViewController alloc] + initWithScheme:[NSString stringWithFormat:@"assets://src/%@", file] + alias:self.demoFilePaths[(NSUInteger) indexPath.row] + extra:nil + ]; + [self.navigationController pushViewController:doricViewController animated:NO]; } @end