diff --git a/doric-iOS/Pod/Classes/Plugin/DoricPopoverPlugin.m b/doric-iOS/Pod/Classes/Plugin/DoricPopoverPlugin.m index 252fc88d..49468845 100644 --- a/doric-iOS/Pod/Classes/Plugin/DoricPopoverPlugin.m +++ b/doric-iOS/Pod/Classes/Plugin/DoricPopoverPlugin.m @@ -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 *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]; }); }