iOS:fix popover view
This commit is contained in:
parent
7f26910f0c
commit
8b66c7d4be
@ -18,10 +18,10 @@ - (void)show:(NSDictionary *)params withPromise:(DoricPromise *)promise {
|
||||
UIView *superView = [UIApplication sharedApplication].windows.lastObject;
|
||||
if (!self.fullScreenView) {
|
||||
self.fullScreenView = [[UIView new] also:^(UIView *it) {
|
||||
it.doricLayout.layoutType = DoricStack;
|
||||
it.width = superView.width;
|
||||
it.height = superView.height;
|
||||
it.top = it.left = 0;
|
||||
it.doricLayout.layoutType = DoricStack;
|
||||
[superView addSubview:it];
|
||||
}];
|
||||
}
|
||||
@ -34,12 +34,11 @@ - (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.doricLayout = [DoricLayout new];
|
||||
[self.fullScreenView addSubview:it.view];
|
||||
|
||||
NSMutableDictionary <NSString *, DoricViewNode *> *map = self.doricContext.headNodes[TYPE];
|
||||
if (map != nil) {
|
||||
self.doricContext.headNodes[TYPE][viewId] = it;
|
||||
self.doricContext.headNodes[TYPE][viewId] = it;
|
||||
} else {
|
||||
map = [[NSMutableDictionary alloc] init];
|
||||
map[viewId] = it;
|
||||
@ -48,6 +47,7 @@ - (void)show:(NSDictionary *)params withPromise:(DoricPromise *)promise {
|
||||
}];
|
||||
}
|
||||
[viewNode blend:params[@"props"]];
|
||||
[self.fullScreenView.doricLayout apply];
|
||||
[promise resolve:nil];
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user