diff --git a/Examples/UIExplorer/TabBarIOSExample.js b/Examples/UIExplorer/TabBarIOSExample.js index a8f913a07de228..13f8e57dac1e61 100644 --- a/Examples/UIExplorer/TabBarIOSExample.js +++ b/Examples/UIExplorer/TabBarIOSExample.js @@ -48,7 +48,9 @@ var TabBarExample = React.createClass({ render: function() { return ( - + + {this.props.children} ); diff --git a/React/Views/RCTTabBar.h b/React/Views/RCTTabBar.h index 694af9ab378eb3..6f491ca08a95a3 100644 --- a/React/Views/RCTTabBar.h +++ b/React/Views/RCTTabBar.h @@ -13,6 +13,9 @@ @interface RCTTabBar : UIView +@property (nonatomic, strong) UIColor *tintColor; +@property (nonatomic, strong) UIColor *barTintColor; + - (instancetype)initWithEventDispatcher:(RCTEventDispatcher *)eventDispatcher NS_DESIGNATED_INITIALIZER; @end diff --git a/React/Views/RCTTabBar.m b/React/Views/RCTTabBar.m index 8a7fb4a43278d1..b5b6240a4c1a38 100644 --- a/React/Views/RCTTabBar.m +++ b/React/Views/RCTTabBar.m @@ -114,6 +114,16 @@ - (void)reactBridgeDidFinishTransaction }]; } +- (void)setBarTintColor:(UIColor *)barTintColor +{ + _tabController.tabBar.barTintColor = barTintColor; +} + +- (void)setTintColor:(UIColor *)tintColor +{ + _tabController.tabBar.tintColor = tintColor; +} + #pragma mark - UITabBarControllerDelegate - (BOOL)tabBarController:(UITabBarController *)tabBarController shouldSelectViewController:(UIViewController *)viewController diff --git a/React/Views/RCTTabBarManager.m b/React/Views/RCTTabBarManager.m index c7dfe09e183e27..0f038c4d741942 100644 --- a/React/Views/RCTTabBarManager.m +++ b/React/Views/RCTTabBarManager.m @@ -23,4 +23,7 @@ - (UIView *)view return [[RCTTabBar alloc] initWithEventDispatcher:_bridge.eventDispatcher]; } +RCT_EXPORT_VIEW_PROPERTY(tintColor, UIColor) +RCT_EXPORT_VIEW_PROPERTY(barTintColor, UIColor) + @end