react-native-navigation的迁移库

RNNBottomTabOptions.m 1.3KB

1234567891011121314151617181920212223242526272829303132333435
  1. #import "RNNBottomTabOptions.h"
  2. #import "DotIndicatorOptions.h"
  3. #import "DotIndicatorParser.h"
  4. @implementation RNNBottomTabOptions
  5. - (instancetype)initWithDict:(NSDictionary *)dict {
  6. self = [super init];
  7. self.tag = arc4random();
  8. self.text = [TextParser parse:dict key:@"text"];
  9. self.badge = [TextParser parse:dict key:@"badge"];
  10. self.badgeColor = [ColorParser parse:dict key:@"badgeColor"];
  11. self.fontFamily = [TextParser parse:dict key:@"fontFamily"];
  12. self.fontWeight = [TextParser parse:dict key:@"fontWeight"];
  13. self.testID = [TextParser parse:dict key:@"testID"];
  14. self.dotIndicator = [DotIndicatorParser parse:dict];
  15. self.icon = [ImageParser parse:dict key:@"icon"];
  16. self.selectedIcon = [ImageParser parse:dict key:@"selectedIcon"];
  17. self.iconColor = [ColorParser parse:dict key:@"iconColor"];
  18. self.selectedIconColor = [ColorParser parse:dict key:@"selectedIconColor"];
  19. self.selectedTextColor = [ColorParser parse:dict key:@"selectedTextColor"];
  20. self.iconInsets = [DictionaryParser parse:dict key:@"iconInsets"];
  21. self.textColor = [ColorParser parse:dict key:@"textColor"];
  22. self.fontSize = [NumberParser parse:dict key:@"fontSize"];
  23. self.visible = [BoolParser parse:dict key:@"visible"];
  24. return self;
  25. }
  26. @end