From e68ed46000bcb28dfb7a6504eebe78e7c00612dd Mon Sep 17 00:00:00 2001 From: zhongwuzw Date: Wed, 16 Oct 2024 23:34:30 +0800 Subject: [PATCH] [iOS] Fabric: Fixes implicit animation when set background color of View --- .../Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm index 87983b0dbc1315..38717434a7c84e 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm @@ -878,6 +878,7 @@ - (void)invalidateLayer _backgroundColorLayer = [CALayer layer]; _backgroundColorLayer.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height); _backgroundColorLayer.zPosition = BACKGROUND_COLOR_ZPOSITION; + _backgroundColorLayer.actions = @{@"backgroundColor" : [NSNull null]}; [self.layer addSublayer:_backgroundColorLayer]; }