react-native-navigation的迁移库

UITabBarController+RNNOptions.m 938B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #import "UITabBarController+RNNOptions.h"
  2. #import "RNNTabBarController.h"
  3. @implementation UITabBarController (RNNOptions)
  4. - (void)rnn_setCurrentTabIndex:(NSUInteger)currentTabIndex {
  5. [self setSelectedIndex:currentTabIndex];
  6. }
  7. - (void)rnn_setCurrentTabID:(NSString *)currentTabId {
  8. [(RNNTabBarController*)self setSelectedIndexByComponentID:currentTabId];
  9. }
  10. - (void)rnn_setTabBarTestID:(NSString *)testID {
  11. self.tabBar.accessibilityIdentifier = testID;
  12. }
  13. - (void)rnn_setTabBarBackgroundColor:(UIColor *)backgroundColor {
  14. self.tabBar.barTintColor = backgroundColor;
  15. }
  16. - (void)rnn_setTabBarStyle:(UIBarStyle)barStyle {
  17. self.tabBar.barStyle = barStyle;
  18. }
  19. - (void)rnn_setTabBarTranslucent:(BOOL)translucent {
  20. self.tabBar.translucent = translucent;
  21. }
  22. - (void)rnn_setTabBarHideShadow:(BOOL)hideShadow {
  23. self.tabBar.clipsToBounds = hideShadow;
  24. }
  25. - (void)rnn_setTabBarVisible:(BOOL)visible {
  26. self.tabBar.hidden = !visible;
  27. }
  28. @end