react-native-navigation的迁移库

ColorParser.m 273B

123456789101112
  1. #import "ColorParser.h"
  2. #import "NullColor.h"
  3. #import <React/RCTConvert.h>
  4. @implementation ColorParser
  5. + (Color *)parse:(NSDictionary *)json key:(NSString *)key {
  6. return json[key] ? [[Color alloc] initWithValue:[RCTConvert UIColor:json[key]]] : [NullColor new];
  7. }
  8. @end