feat:refact DoricLayout and layout config

This commit is contained in:
pengfei.zhou
2019-11-15 15:38:24 +08:00
parent 3289513720
commit 6017e7120d
16 changed files with 355 additions and 405 deletions

View File

@@ -30,7 +30,7 @@ - (void)viewDidLoad {
NSString *jsContent = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil];
self.doricContext = [[DoricContext alloc] initWithScript:jsContent source:@"test.js"];
[self.doricContext.rootNode setupRootView:[[DoricStackView new] also:^(DoricStackView *it) {
it.layoutConfig = [[DoricStackConfig alloc] initWithWidth:DoricLayoutAtMost height:DoricLayoutAtMost];
it.layoutConfig = [[DoricLayoutConfig alloc] initWithWidth:DoricLayoutAtMost height:DoricLayoutAtMost];
[self.view addSubview:it];
}]];
[self.doricContext initContextWithWidth:self.view.width height:self.view.height];