react-native-navigation的迁移库

RNNBackButtonOptions.m 865B

12345678910111213141516171819202122232425262728293031
  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.fontFamily = [TextParser parse:dict key:@"fontFamily"];
  12. self.fontSize = [NumberParser parse:dict key:@"fontSize"];
  13. return self;
  14. }
  15. - (BOOL)hasValue {
  16. return self.icon.hasValue ||
  17. self.showTitle.hasValue ||
  18. self.color.hasValue ||
  19. self.fontFamily.hasValue ||
  20. self.fontSize.hasValue ||
  21. self.title.hasValue;
  22. }
  23. @end