Skip to content

Commit

Permalink
Remove deprecated uses of UIActivityIndicatorViewStyle (facebook#38208)
Browse files Browse the repository at this point in the history
Summary:
Super simple change to replace some deprecated ENUM values with the correct one, now that we're on iOS 13.0+.

From `UIActivityIndicator.h`:
```
typedef NS_ENUM(NSInteger, UIActivityIndicatorViewStyle) {
    UIActivityIndicatorViewStyleMedium  API_AVAILABLE(ios(13.0), tvos(13.0)) = 100,
    UIActivityIndicatorViewStyleLarge   API_AVAILABLE(ios(13.0), tvos(13.0)) = 101,

    UIActivityIndicatorViewStyleWhiteLarge API_DEPRECATED_WITH_REPLACEMENT("UIActivityIndicatorViewStyleLarge", ios(2.0, 13.0), tvos(9.0, 13.0)) = 0,
    UIActivityIndicatorViewStyleWhite API_DEPRECATED_WITH_REPLACEMENT("UIActivityIndicatorViewStyleMedium", ios(2.0, 13.0), tvos(9.0, 13.0)) = 1,
    UIActivityIndicatorViewStyleGray API_DEPRECATED_WITH_REPLACEMENT("UIActivityIndicatorViewStyleMedium", ios(2.0, 13.0)) API_UNAVAILABLE(tvos) = 2,
};
```

## Changelog:

[IOS] [CHANGED] - Remove deprecated uses of UIActivityIndicatorViewStyle

Pull Request resolved: facebook#38208

Test Plan: CI should pass

Reviewed By: cipolleschi

Differential Revision: D47254035

Pulled By: rshest

fbshipit-source-id: 6d3270899e8d52611d91c777f324c3c6f0c520be
  • Loading branch information
Saadnajmi committed Jan 29, 2024
1 parent 7119f0e commit a331ad0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ static UIActivityIndicatorViewStyle convertActivityIndicatorViewStyle(const Acti
{
switch (size) {
case ActivityIndicatorViewSize::Small:
return UIActivityIndicatorViewStyleWhite;
return UIActivityIndicatorViewStyleMedium;
case ActivityIndicatorViewSize::Large:
return UIActivityIndicatorViewStyleWhiteLarge;
return UIActivityIndicatorViewStyleLarge;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ @implementation RCTConvert (UIActivityIndicatorView)
RCT_ENUM_CONVERTER(
UIActivityIndicatorViewStyle,
(@{
@"large" : @(UIActivityIndicatorViewStyleWhiteLarge),
@"small" : @(UIActivityIndicatorViewStyleWhite),
@"large" : @(UIActivityIndicatorViewStyleLarge),
@"small" : @(UIActivityIndicatorViewStyleMedium),
}),
UIActivityIndicatorViewStyleWhiteLarge,
UIActivityIndicatorViewStyleLarge,
integerValue)

@end
Expand Down

0 comments on commit a331ad0

Please sign in to comment.