From d553e0b0415a7795603c21e4796e590ef286f8f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ruifanyuan=28=E8=A2=81=E7=91=9E=E7=B9=81=29?= Date: Thu, 19 Oct 2023 19:22:22 +0800 Subject: [PATCH] fix(ios): fix modal view layout issue --- .../component/modal/NativeRenderModalHostViewManager.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/renderer/native/ios/renderer/component/modal/NativeRenderModalHostViewManager.mm b/renderer/native/ios/renderer/component/modal/NativeRenderModalHostViewManager.mm index 1edc7e129bc..222cd126dc3 100644 --- a/renderer/native/ios/renderer/component/modal/NativeRenderModalHostViewManager.mm +++ b/renderer/native/ios/renderer/component/modal/NativeRenderModalHostViewManager.mm @@ -33,6 +33,11 @@ @interface NativeRenderObjectModalHost : HippyShadowView @implementation NativeRenderObjectModalHost +- (void)insertHippySubview:(HippyShadowView *)subview atIndex:(NSInteger)atIndex{ + [super insertHippySubview:subview atIndex:atIndex]; + CGRect frame = { .origin = CGPointZero, .size = NativeRenderScreenSize() }; + [subview setLayoutFrame:frame]; +} - (void)setDomManager:(std::weak_ptr)domManager { [super setDomManager:domManager]; CGRect frame = { .origin = CGPointZero, .size = NativeRenderScreenSize() };