iOS refact DoricLayout

This commit is contained in:
pengfei.zhou
2020-04-03 16:36:43 +08:00
committed by osborn
parent ca6a3284f2
commit abbe0ba377
32 changed files with 540 additions and 761 deletions

View File

@@ -81,7 +81,7 @@ - (void)setLeft:(NSDictionary *)params withPromise:(DoricPromise *)promise {
viewNode = [[DoricViewNode create:self.doricContext withType:type] also:^(DoricViewNode *it) {
it.viewId = viewId;
[it initWithSuperNode:nil];
it.view.layoutConfig = [DoricLayoutConfig new];
it.view.doricLayout = [DoricLayout new];
[self.doricContext.navBar doric_navBar_setLeft:it.view];
NSMutableDictionary <NSString *, DoricViewNode *> *map = self.doricContext.headNodes[TYPE_LEFT];
@@ -112,7 +112,7 @@ - (void)setRight:(NSDictionary *)params withPromise:(DoricPromise *)promise {
viewNode = [[DoricViewNode create:self.doricContext withType:type] also:^(DoricViewNode *it) {
it.viewId = viewId;
[it initWithSuperNode:nil];
it.view.layoutConfig = [DoricLayoutConfig new];
it.view.doricLayout = [DoricLayout new];
[self.doricContext.navBar doric_navBar_setRight:it.view];
NSMutableDictionary <NSString *, DoricViewNode *> *map = self.doricContext.headNodes[TYPE_RIGHT];

View File

@@ -17,7 +17,8 @@ - (void)show:(NSDictionary *)params withPromise:(DoricPromise *)promise {
dispatch_async(dispatch_get_main_queue(), ^{
UIView *superView = [UIApplication sharedApplication].windows.lastObject;
if (!self.fullScreenView) {
self.fullScreenView = [[DoricStackView new] also:^(UIView *it) {
self.fullScreenView = [[UIView new] also:^(UIView *it) {
it.doricLayout.layoutType = DoricStack;
it.width = superView.width;
it.height = superView.height;
it.top = it.left = 0;
@@ -33,7 +34,7 @@ - (void)show:(NSDictionary *)params withPromise:(DoricPromise *)promise {
viewNode = [[DoricViewNode create:self.doricContext withType:type] also:^(DoricViewNode *it) {
it.viewId = viewId;
[it initWithSuperNode:nil];
it.view.layoutConfig = [DoricLayoutConfig new];
it.view.doricLayout = [DoricLayout new];
[self.fullScreenView addSubview:it.view];
NSMutableDictionary <NSString *, DoricViewNode *> *map = self.doricContext.headNodes[TYPE];