react-native-navigation的迁移库

RNNBottomTabOptions.m 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #import "RNNBottomTabOptions.h"
  2. #import "UIImage+tint.h"
  3. #import "UITabBarController+RNNOptions.h"
  4. #import "UIViewController+RNNOptions.h"
  5. #import "RNNTabBarItemCreator.h"
  6. @implementation RNNBottomTabOptions
  7. - (instancetype)initWithDict:(NSDictionary *)dict {
  8. self = [super init];
  9. self.text = [TextParser parse:dict key:@"text"];
  10. self.badge = [TextParser parse:dict key:@"badge"];
  11. self.fontFamily = [TextParser parse:dict key:@"fontFamily"];
  12. self.testID = [TextParser parse:dict key:@"testID"];
  13. self.badgeColor = [ColorParser parse:dict key:@"badgeColor"];
  14. self.icon = [ImageParser parse:dict key:@"icon"];
  15. self.selectedIcon = [ImageParser parse:dict key:@"selectedIcon"];
  16. self.iconColor = [ColorParser parse:dict key:@"iconColor"];
  17. self.selectedIconColor = [ColorParser parse:dict key:@"selectedIconColor"];
  18. self.selectedTextColor = [ColorParser parse:dict key:@"selectedTextColor"];
  19. self.iconInsets = [DictionaryParser parse:dict key:@"iconInsets"];
  20. self.textColor = [ColorParser parse:dict key:@"textColor"];
  21. self.fontSize = [NumberParser parse:dict key:@"fontSize"];
  22. self.visible = [BoolParser parse:dict key:@"visible"];
  23. return self;
  24. }
  25. -(void)resetOptions {
  26. self.text = nil;
  27. self.badge = nil;
  28. self.visible = nil;
  29. self.icon = nil;
  30. self.testID = nil;
  31. self.iconInsets = nil;
  32. self.selectedIcon = nil;
  33. }
  34. @end