react-native-navigation的迁移库

RNNButtonOptions.m 631B

12345678910111213141516171819202122
  1. #import "RNNButtonOptions.h"
  2. @implementation RNNButtonOptions
  3. - (instancetype)initWithDict:(NSDictionary *)dict {
  4. self = [super init];
  5. self.fontFamily = [TextParser parse:dict key:@"fontFamily"];
  6. self.text = [TextParser parse:dict key:@"text"];
  7. self.fontSize = [NumberParser parse:dict key:@"fontSize"];
  8. self.color = [ColorParser parse:dict key:@"color"];
  9. self.disabledColor = [ColorParser parse:dict key:@"disabledColor"];
  10. self.icon = [ImageParser parse:dict key:@"icon"];
  11. self.iconInsets = [[RNNInsetsOptions alloc] initWithDict:dict];
  12. self.enabled = [BoolParser parse:dict key:@"enabled"];
  13. return self;
  14. }
  15. @end