Browse Source

Allow setting UITabBarItem.title to default value (#5280)

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`.
Danilo Bürger 5 years ago
parent
commit
76d832b683
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      lib/ios/RNNTabBarItemCreator.m

+ 1
- 1
lib/ios/RNNTabBarItemCreator.m View File

12
 	
12
 	
13
 	tabItem.image = [self getIconImage:icon withTint:iconColor];
13
 	tabItem.image = [self getIconImage:icon withTint:iconColor];
14
 	tabItem.selectedImage = [self getSelectedIconImage:selectedIcon selectedIconColor:selectedIconColor];
14
 	tabItem.selectedImage = [self getSelectedIconImage:selectedIcon selectedIconColor:selectedIconColor];
15
-	tabItem.title = [bottomTabOptions.text getWithDefaultValue:@""];
15
+	tabItem.title = [bottomTabOptions.text getWithDefaultValue:nil];
16
 	tabItem.tag = bottomTabOptions.tag;
16
 	tabItem.tag = bottomTabOptions.tag;
17
 	tabItem.accessibilityIdentifier = [bottomTabOptions.testID getWithDefaultValue:nil];
17
 	tabItem.accessibilityIdentifier = [bottomTabOptions.testID getWithDefaultValue:nil];
18
 	
18