Skip to content

Commit

Permalink
fixes badgeColor in ios 13+ (#6246)
Browse files Browse the repository at this point in the history
The badge colour was not changing from the default red in the tab bar item (when passing "badgeColor" to "bottomTab" options)
  • Loading branch information
DaveAdams88 authored May 31, 2020
1 parent 5b1d5b8 commit 28928e5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/ios/UIViewController+RNNOptions.m
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,12 @@ - (void)setTabBarItemBadge:(NSString *)badge {
}

- (void)setTabBarItemBadgeColor:(UIColor *)badgeColor {
if (@available(iOS 10.0, *)) {
self.tabBarItem.badgeColor = badgeColor;
}
if (@available(iOS 13.0, *)) {
self.tabBarItem.standardAppearance.stackedLayoutAppearance.normal.badgeBackgroundColor = badgeColor;
}
else if (@available(iOS 10.0, *)) {
self.tabBarItem.badgeColor = badgeColor;
}
}

- (void)setStatusBarStyle:(NSString *)style animated:(BOOL)animated {
Expand Down

0 comments on commit 28928e5

Please sign in to comment.