iOS Bridge part

This commit is contained in:
pengfei.zhou
2019-07-30 11:25:05 +08:00
parent c1e4ccd984
commit 6e6dc4edef
8 changed files with 91 additions and 9 deletions

View File

@@ -33,6 +33,8 @@ - (void)viewDidLoad {
NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"demo" ofType:@"js"];
NSString *jsContent = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
self.doricContext = [[DoricContext alloc] initWithScript:jsContent source:@"demo"];
[self.doricContext callEntity:@"__init__",@{@"width": [NSNumber numberWithFloat:self.view.width],
@"height":[NSNumber numberWithFloat:self.view.height]},nil];
}
- (void)test:(UIView *)view {