Skip to content

Commit defc0c8

Browse files
joevilchesblakef
authored andcommitted
Fix animating background colors in View (#47101)
Summary: Pull Request resolved: #47101 See #47011 borders do not have this problem because they call `removeAllAnimations` on the layer after changing it, which is what I am doing here Changelog: [iOS] [fixed] - Fixed bug where background colors would sometimes animate when changing on Views Reviewed By: cipolleschi Differential Revision: D64493968 fbshipit-source-id: cf81549f21b124b67c6e7647c6ae827bfe80a9cf
1 parent e56bd89 commit defc0c8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm

+2
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,8 @@ - (void)invalidateLayer
833833
_backgroundColorLayer.mask = maskLayer;
834834
_backgroundColorLayer.cornerRadius = 0;
835835
}
836+
837+
[_backgroundColorLayer removeAllAnimations];
836838
}
837839

838840
// borders

0 commit comments

Comments
 (0)