Browse Source

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

Grundmanis 7 years ago
parent
commit
183fee0aef
2 changed files with 7 additions and 0 deletions
  1. 1
    0
      docs/styling-the-tab-bar.md
  2. 6
    0
      ios/RCCTabBarController.m

+ 1
- 0
docs/styling-the-tab-bar.md View File

20
   tabBarBackgroundColor: '#551A8B' // change the background color of the tab bar
20
   tabBarBackgroundColor: '#551A8B' // change the background color of the tab bar
21
   tabBarTranslucent: false // change the translucent of the tab bar to false
21
   tabBarTranslucent: false // change the translucent of the tab bar to false
22
   tabBarTextFontFamily: 'Avenir-Medium' //change the tab font family
22
   tabBarTextFontFamily: 'Avenir-Medium' //change the tab font family
23
+  tabBarHideShadow: true // iOS only. Remove default tab bar top shadow (hairline)
23
   forceTitlesDisplay: true // Android only. If true - Show all bottom tab labels. If false - only the selected tab's label is visible.
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 View File

103
     {
103
     {
104
       self.tabBar.translucent = [tabBarTranslucent boolValue] ? YES : NO;
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
   NSMutableArray *viewControllers = [NSMutableArray array];
114
   NSMutableArray *viewControllers = [NSMutableArray array];