Skip to content

Commit

Permalink
Allow setting UITabBarItem.title to default value (#5280)
Browse files Browse the repository at this point in the history
The default value for `UITabBarItem.title` is `nil` as specified by the docs:
> You should set this property before adding the item to a bar. The default value is nil.
https://developer.apple.com/documentation/uikit/uibaritem/1616412-title

This changes allows for this to be `nil`.
  • Loading branch information
danilobuerger authored and guyca committed Jul 17, 2019
1 parent fa1a20e commit 76d832b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ios/RNNTabBarItemCreator.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ + (UITabBarItem *)updateTabBarItem:(UITabBarItem *)tabItem bottomTabOptions:(RNN

tabItem.image = [self getIconImage:icon withTint:iconColor];
tabItem.selectedImage = [self getSelectedIconImage:selectedIcon selectedIconColor:selectedIconColor];
tabItem.title = [bottomTabOptions.text getWithDefaultValue:@""];
tabItem.title = [bottomTabOptions.text getWithDefaultValue:nil];
tabItem.tag = bottomTabOptions.tag;
tabItem.accessibilityIdentifier = [bottomTabOptions.testID getWithDefaultValue:nil];

Expand Down

0 comments on commit 76d832b

Please sign in to comment.