浏览代码

Fix iOS 9 setBadgeColor exception (#4270)

Alexander Kurnikowski 6 年前
父节点
当前提交
8ea6271605
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      lib/ios/UIViewController+RNNOptions.m

+ 3
- 1
lib/ios/UIViewController+RNNOptions.m 查看文件

@@ -87,7 +87,9 @@ const NSInteger BLUR_STATUS_TAG = 78264801;
87 87
 }
88 88
 
89 89
 - (void)rnn_setTabBarItemBadgeColor:(UIColor *)badgeColor {
90
-	self.tabBarItem.badgeColor = badgeColor;
90
+	if (@available(iOS 10.0, *)) {
91
+		self.tabBarItem.badgeColor = badgeColor;
92
+	}
91 93
 }
92 94
 
93 95
 - (void)rnn_setStatusBarStyle:(NSString *)style animated:(BOOL)animated {