react-native-navigation的迁移库

DotIndicatorOptions.m 600B

12345678910111213141516171819202122232425262728
  1. #import "DotIndicatorOptions.h"
  2. #import "NullColor.h"
  3. #import "NullNumber.h"
  4. #import "NullBool.h"
  5. @implementation DotIndicatorOptions
  6. - (instancetype)initWithDict:(NSDictionary *)dict {
  7. self = [super init];
  8. self.color = [ColorParser parse:dict key:@"color"];
  9. self.size = [NumberParser parse:dict key:@"size"];
  10. self.visible = [BoolParser parse:dict key:@"visible"];
  11. return self;
  12. }
  13. - (instancetype)init {
  14. _color = [NullColor new];
  15. _size = [NullNumber new];
  16. _visible = [NullBool new];
  17. return self;
  18. }
  19. - (bool)hasValue {
  20. return [self.visible hasValue];
  21. }
  22. @end