react-native-navigation的迁移库

RNNBackButtonOptions.m 639B

123456789101112131415161718192021222324252627
  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. return self;
  12. }
  13. - (BOOL)hasValue {
  14. return self.icon.hasValue ||
  15. self.showTitle.hasValue ||
  16. self.color.hasValue ||
  17. self.title.hasValue;
  18. }
  19. @end