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 {
|
||||
[view.doricLayout apply:CGSizeMake(self.navigationController.navigationBar.width, self.navigationController.navigationBar.height)];
|
||||
UIBarButtonItem *custom = [[UIBarButtonItem alloc] initWithCustomView:view];
|
||||
self.navigationItem.leftBarButtonItem = custom;
|
||||
}
|
||||
|
||||
- (void)doric_navBar_setRight:(UIView *)view {
|
||||
[view.doricLayout apply:CGSizeMake(self.navigationController.navigationBar.width, self.navigationController.navigationBar.height)];
|
||||
UIBarButtonItem *custom = [[UIBarButtonItem alloc] initWithCustomView:view];
|
||||
self.navigationItem.rightBarButtonItem = custom;
|
||||
}
|
||||
|
||||
- (void)doric_navBar_setCenter:(UIView *)view {
|
||||
[view.doricLayout apply:CGSizeMake(self.navigationController.navigationBar.width, self.navigationController.navigationBar.height)];
|
||||
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) {
|
||||
it.viewId = viewId;
|
||||
[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];
|
||||
if (map != nil) {
|
||||
@ -96,6 +94,7 @@ - (void)setLeft:(NSDictionary *)params withPromise:(DoricPromise *)promise {
|
||||
}];
|
||||
}
|
||||
[viewNode blend:params[@"props"]];
|
||||
[self.doricContext.navBar doric_navBar_setLeft:viewNode.view];
|
||||
[promise resolve:nil];
|
||||
});
|
||||
} else {
|
||||
@ -113,8 +112,6 @@ - (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.doricLayout = [DoricLayout new];
|
||||
[self.doricContext.navBar doric_navBar_setRight:it.view];
|
||||
|
||||
NSMutableDictionary <NSString *, DoricViewNode *> *map = self.doricContext.headNodes[TYPE_RIGHT];
|
||||
if (map != nil) {
|
||||
@ -127,6 +124,7 @@ - (void)setRight:(NSDictionary *)params withPromise:(DoricPromise *)promise {
|
||||
}];
|
||||
}
|
||||
[viewNode blend:params[@"props"]];
|
||||
[self.doricContext.navBar doric_navBar_setRight:viewNode.view];
|
||||
[promise resolve:nil];
|
||||
});
|
||||
} else {
|
||||
@ -144,8 +142,6 @@ - (void)setCenter:(NSDictionary *)params withPromise:(DoricPromise *)promise {
|
||||
viewNode = [[DoricViewNode create:self.doricContext withType:type] also:^(DoricViewNode *it) {
|
||||
it.viewId = viewId;
|
||||
[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];
|
||||
if (map != nil) {
|
||||
@ -158,6 +154,7 @@ - (void)setCenter:(NSDictionary *)params withPromise:(DoricPromise *)promise {
|
||||
}];
|
||||
}
|
||||
[viewNode blend:params[@"props"]];
|
||||
[self.doricContext.navBar doric_navBar_setCenter:viewNode.view];
|
||||
[promise resolve:nil];
|
||||
});
|
||||
} 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