react-native-navigation的迁移库

RNNButtonOptions.m 719B

1234567891011121314151617181920212223
  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[@"iconInsets"]];
  12. self.enabled = [BoolParser parse:dict key:@"enabled"];
  13. self.selectTabOnPress = [BoolParser parse:dict key:@"selectTabOnPress"];
  14. return self;
  15. }
  16. @end