new DoricLayout bug fix
This commit is contained in:
parent
2e9459f80f
commit
0c6fa027b1
@ -125,16 +125,19 @@ - (void)doric_navBar_setBackgroundColor:(UIColor *)color {
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)doric_navBar_setLeft:(UIView *)view {
|
- (void)doric_navBar_setLeft:(UIView *)view {
|
||||||
|
[view.doricLayout apply:CGSizeMake(self.navigationController.navigationBar.width, self.navigationController.navigationBar.height)];
|
||||||
UIBarButtonItem *custom = [[UIBarButtonItem alloc] initWithCustomView:view];
|
UIBarButtonItem *custom = [[UIBarButtonItem alloc] initWithCustomView:view];
|
||||||
self.navigationItem.leftBarButtonItem = custom;
|
self.navigationItem.leftBarButtonItem = custom;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)doric_navBar_setRight:(UIView *)view {
|
- (void)doric_navBar_setRight:(UIView *)view {
|
||||||
|
[view.doricLayout apply:CGSizeMake(self.navigationController.navigationBar.width, self.navigationController.navigationBar.height)];
|
||||||
UIBarButtonItem *custom = [[UIBarButtonItem alloc] initWithCustomView:view];
|
UIBarButtonItem *custom = [[UIBarButtonItem alloc] initWithCustomView:view];
|
||||||
self.navigationItem.rightBarButtonItem = custom;
|
self.navigationItem.rightBarButtonItem = custom;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)doric_navBar_setCenter:(UIView *)view {
|
- (void)doric_navBar_setCenter:(UIView *)view {
|
||||||
|
[view.doricLayout apply:CGSizeMake(self.navigationController.navigationBar.width, self.navigationController.navigationBar.height)];
|
||||||
self.navigationItem.titleView = view;
|
self.navigationItem.titleView = view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,8 +82,6 @@ - (void)setLeft:(NSDictionary *)params withPromise:(DoricPromise *)promise {
|
|||||||
viewNode = [[DoricViewNode create:self.doricContext withType:type] also:^(DoricViewNode *it) {
|
viewNode = [[DoricViewNode create:self.doricContext withType:type] also:^(DoricViewNode *it) {
|
||||||
it.viewId = viewId;
|
it.viewId = viewId;
|
||||||
[it initWithSuperNode:nil];
|
[it initWithSuperNode:nil];
|
||||||
it.view.doricLayout = [DoricLayout new];
|
|
||||||
[self.doricContext.navBar doric_navBar_setLeft:it.view];
|
|
||||||
|
|
||||||
NSMutableDictionary <NSString *, DoricViewNode *> *map = self.doricContext.headNodes[TYPE_LEFT];
|
NSMutableDictionary <NSString *, DoricViewNode *> *map = self.doricContext.headNodes[TYPE_LEFT];
|
||||||
if (map != nil) {
|
if (map != nil) {
|
||||||
@ -96,6 +94,7 @@ - (void)setLeft:(NSDictionary *)params withPromise:(DoricPromise *)promise {
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
[viewNode blend:params[@"props"]];
|
[viewNode blend:params[@"props"]];
|
||||||
|
[self.doricContext.navBar doric_navBar_setLeft:viewNode.view];
|
||||||
[promise resolve:nil];
|
[promise resolve:nil];
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -113,8 +112,6 @@ - (void)setRight:(NSDictionary *)params withPromise:(DoricPromise *)promise {
|
|||||||
viewNode = [[DoricViewNode create:self.doricContext withType:type] also:^(DoricViewNode *it) {
|
viewNode = [[DoricViewNode create:self.doricContext withType:type] also:^(DoricViewNode *it) {
|
||||||
it.viewId = viewId;
|
it.viewId = viewId;
|
||||||
[it initWithSuperNode:nil];
|
[it initWithSuperNode:nil];
|
||||||
it.view.doricLayout = [DoricLayout new];
|
|
||||||
[self.doricContext.navBar doric_navBar_setRight:it.view];
|
|
||||||
|
|
||||||
NSMutableDictionary <NSString *, DoricViewNode *> *map = self.doricContext.headNodes[TYPE_RIGHT];
|
NSMutableDictionary <NSString *, DoricViewNode *> *map = self.doricContext.headNodes[TYPE_RIGHT];
|
||||||
if (map != nil) {
|
if (map != nil) {
|
||||||
@ -127,6 +124,7 @@ - (void)setRight:(NSDictionary *)params withPromise:(DoricPromise *)promise {
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
[viewNode blend:params[@"props"]];
|
[viewNode blend:params[@"props"]];
|
||||||
|
[self.doricContext.navBar doric_navBar_setRight:viewNode.view];
|
||||||
[promise resolve:nil];
|
[promise resolve:nil];
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -144,8 +142,6 @@ - (void)setCenter:(NSDictionary *)params withPromise:(DoricPromise *)promise {
|
|||||||
viewNode = [[DoricViewNode create:self.doricContext withType:type] also:^(DoricViewNode *it) {
|
viewNode = [[DoricViewNode create:self.doricContext withType:type] also:^(DoricViewNode *it) {
|
||||||
it.viewId = viewId;
|
it.viewId = viewId;
|
||||||
[it initWithSuperNode:nil];
|
[it initWithSuperNode:nil];
|
||||||
it.view.doricLayout = [DoricLayout new];
|
|
||||||
[self.doricContext.navBar doric_navBar_setCenter:it.view];
|
|
||||||
|
|
||||||
NSMutableDictionary <NSString *, DoricViewNode *> *map = self.doricContext.headNodes[TYPE_CENTER];
|
NSMutableDictionary <NSString *, DoricViewNode *> *map = self.doricContext.headNodes[TYPE_CENTER];
|
||||||
if (map != nil) {
|
if (map != nil) {
|
||||||
@ -158,6 +154,7 @@ - (void)setCenter:(NSDictionary *)params withPromise:(DoricPromise *)promise {
|
|||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
[viewNode blend:params[@"props"]];
|
[viewNode blend:params[@"props"]];
|
||||||
|
[self.doricContext.navBar doric_navBar_setCenter:viewNode.view];
|
||||||
[promise resolve:nil];
|
[promise resolve:nil];
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
2
doric-web/dist/index.js.map
vendored
2
doric-web/dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user