react-native-navigation的迁移库

ImageParser.m 273B

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