react-native-navigation的迁移库

UITabBarController+RNNOptions.m 858B

1234567891011121314151617181920212223242526272829303132333435
  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. @end