Pārlūkot izejas kodu

[iOS] Added option to remove default tab bar shadow (hairline) (#1297)

Grundmanis 7 gadus atpakaļ
vecāks
revīzija
183fee0aef
2 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  1. 1
    0
      docs/styling-the-tab-bar.md
  2. 6
    0
      ios/RCCTabBarController.m

+ 1
- 0
docs/styling-the-tab-bar.md Parādīt failu

@@ -20,6 +20,7 @@ Navigation.startTabBasedApp({
20 20
   tabBarBackgroundColor: '#551A8B' // change the background color of the tab bar
21 21
   tabBarTranslucent: false // change the translucent of the tab bar to false
22 22
   tabBarTextFontFamily: 'Avenir-Medium' //change the tab font family
23
+  tabBarHideShadow: true // iOS only. Remove default tab bar top shadow (hairline)
23 24
   forceTitlesDisplay: true // Android only. If true - Show all bottom tab labels. If false - only the selected tab's label is visible.
24 25
 }
25 26
 ```

+ 6
- 0
ios/RCCTabBarController.m Parādīt failu

@@ -103,6 +103,12 @@
103 103
     {
104 104
       self.tabBar.translucent = [tabBarTranslucent boolValue] ? YES : NO;
105 105
     }
106
+
107
+    NSString *tabBarHideShadow = tabsStyle[@"tabBarHideShadow"];
108
+    if (tabBarHideShadow)
109
+    {
110
+      self.tabBar.clipsToBounds = [tabBarHideShadow boolValue] ? YES : NO;
111
+    }
106 112
   }
107 113
   
108 114
   NSMutableArray *viewControllers = [NSMutableArray array];