diff --git a/React/Views/RCTActivityIndicatorViewManager.m b/React/Views/RCTActivityIndicatorViewManager.m index 5de5643a3b9b1b..932e2aa9517da6 100644 --- a/React/Views/RCTActivityIndicatorViewManager.m +++ b/React/Views/RCTActivityIndicatorViewManager.m @@ -33,7 +33,17 @@ - (UIView *)view RCT_EXPORT_VIEW_PROPERTY(color, UIColor) RCT_EXPORT_VIEW_PROPERTY(hidesWhenStopped, BOOL) -RCT_REMAP_VIEW_PROPERTY(size, activityIndicatorViewStyle, UIActivityIndicatorViewStyle) +RCT_CUSTOM_VIEW_PROPERTY(size, UIActivityIndicatorViewStyle, UIActivityIndicatorView) +{ + /* + Setting activityIndicatorViewStyle overrides the color, so restore the original color + after setting the indicator style. + */ + UIColor *oldColor = view.color; + view.activityIndicatorViewStyle = json ? [RCTConvert UIActivityIndicatorViewStyle: json] : defaultView.activityIndicatorViewStyle; + view.color = oldColor; +} + RCT_CUSTOM_VIEW_PROPERTY(animating, BOOL, UIActivityIndicatorView) { BOOL animating = json ? [RCTConvert BOOL:json] : [defaultView isAnimating];