From 76d832b683b3daca530340acdcfbc30acf36b568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danilo=20B=C3=BCrger?= Date: Wed, 17 Jul 2019 13:07:36 +0200 Subject: [PATCH] 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`. --- lib/ios/RNNTabBarItemCreator.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ios/RNNTabBarItemCreator.m b/lib/ios/RNNTabBarItemCreator.m index 24a52a645a6..14f81fb20f8 100644 --- a/lib/ios/RNNTabBarItemCreator.m +++ b/lib/ios/RNNTabBarItemCreator.m @@ -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];