react-native-navigation的迁移库

BottomTabsAppearancePresenter.m 637B

12345678910111213141516171819
  1. #import "BottomTabsAppearancePresenter.h"
  2. @implementation BottomTabsAppearancePresenter
  3. - (void)applyOptionsOnInit:(RNNNavigationOptions *)options {
  4. [super applyOptionsOnInit:options];
  5. UITabBarController *bottomTabs = self.tabBarController;
  6. bottomTabs.tabBar.standardAppearance = [UITabBarAppearance new];
  7. }
  8. - (void)setTabBarBackgroundColor:(UIColor *)backgroundColor {
  9. UITabBarController *bottomTabs = self.tabBarController;
  10. for (UIViewController* childViewController in bottomTabs.childViewControllers) {
  11. childViewController.tabBarItem.standardAppearance.backgroundColor = backgroundColor;
  12. }
  13. }
  14. @end