From ab4ddf754899026907de3144b77d8403df89d329 Mon Sep 17 00:00:00 2001 From: wwwcg Date: Mon, 29 Jul 2024 20:12:30 +0800 Subject: [PATCH] chore(ios): add debug property for shadowView --- ios/sdk/component/view/UIView+Hippy.h | 2 +- ios/sdk/module/uimanager/HippyUIManager.mm | 17 ++++++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ios/sdk/component/view/UIView+Hippy.h b/ios/sdk/component/view/UIView+Hippy.h index 993f08136da..1d48439d388 100644 --- a/ios/sdk/component/view/UIView+Hippy.h +++ b/ios/sdk/component/view/UIView+Hippy.h @@ -21,7 +21,7 @@ */ #import - +#import "HippyDefines.h" #import "HippyComponent.h" #import "HippyViewEventProtocol.h" diff --git a/ios/sdk/module/uimanager/HippyUIManager.mm b/ios/sdk/module/uimanager/HippyUIManager.mm index 2d0758e8d5a..d4d6364c6c6 100644 --- a/ios/sdk/module/uimanager/HippyUIManager.mm +++ b/ios/sdk/module/uimanager/HippyUIManager.mm @@ -952,7 +952,22 @@ - (void)_manageChildren:(NSNumber *)containerTag return; } } - [uiManager createViewByComponentData:componentData hippyVirtualNode:node hippyTag:hippyTag properties:newProps viewName:viewName]; + +#if HIPPY_DEV + UIView *view = [uiManager createViewByComponentData:componentData + hippyVirtualNode:node + hippyTag:hippyTag + properties:newProps + viewName:viewName]; + + view._DEBUG_hippyShadowView = shadowView; +#else + UIView *view = [uiManager createViewByComponentData:componentData + hippyVirtualNode:node + hippyTag:hippyTag + properties:newProps + viewName:viewName]; +#endif /* HIPPY_DEV */ }]; [self addVirtulNodeBlock:^(HippyUIManager *uiManager, __unused NSDictionary *virtualNodeRegistry) {