react-native-navigation的迁移库

RNNBackButtonOptions.m 922B

1234567891011121314151617181920212223242526272829303132
  1. #import "RNNBackButtonOptions.h"
  2. @implementation RNNBackButtonOptions
  3. - (instancetype)initWithDict:(NSDictionary *)dict {
  4. self = [super init];
  5. self.icon = [ImageParser parse:dict key:@"icon"];
  6. self.title = [TextParser parse:dict key:@"title"];
  7. self.transition = [TextParser parse:dict key:@"transition"];
  8. self.color = [ColorParser parse:dict key:@"color"];
  9. self.showTitle = [BoolParser parse:dict key:@"showTitle"];
  10. self.visible = [BoolParser parse:dict key:@"visible"];
  11. self.testID = [TextParser parse:dict key:@"testID"];
  12. self.fontFamily = [TextParser parse:dict key:@"fontFamily"];
  13. self.fontSize = [NumberParser parse:dict key:@"fontSize"];
  14. return self;
  15. }
  16. - (BOOL)hasValue {
  17. return self.icon.hasValue ||
  18. self.showTitle.hasValue ||
  19. self.color.hasValue ||
  20. self.fontFamily.hasValue ||
  21. self.fontSize.hasValue ||
  22. self.title.hasValue;
  23. }
  24. @end