Fix animating background colors in View (#47101)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47101

See https://github.com/facebook/react-native/issues/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
This commit is contained in:
Joe Vilches
2024-10-28 14:19:54 +00:00
committed by Blake Friedman
parent e56bd89eff
commit defc0c8c21
@@ -833,6 +833,8 @@ static RCTBorderStyle RCTBorderStyleFromBorderStyle(BorderStyle borderStyle)
_backgroundColorLayer.mask = maskLayer;
_backgroundColorLayer.cornerRadius = 0;
}
[_backgroundColorLayer removeAllAnimations];
}
// borders