2015-01-29 17:10:49 -08:00
|
|
|
// Copyright 2004-present Facebook. All Rights Reserved.
|
|
|
|
|
|
|
|
#import "RCTNetworkImageViewManager.h"
|
|
|
|
|
|
|
|
#import "RCTNetworkImageView.h"
|
|
|
|
|
|
|
|
#import "RCTConvert.h"
|
|
|
|
#import "RCTUtils.h"
|
|
|
|
|
|
|
|
#import "RCTImageDownloader.h"
|
|
|
|
|
|
|
|
@implementation RCTNetworkImageViewManager
|
|
|
|
|
2015-02-03 16:15:20 -08:00
|
|
|
- (UIView *)view
|
2015-01-29 17:10:49 -08:00
|
|
|
{
|
|
|
|
RCTNetworkImageView *view = [[RCTNetworkImageView alloc] initWithFrame:CGRectZero imageDownloader:[RCTImageDownloader sharedInstance]];
|
|
|
|
view.contentMode = UIViewContentModeScaleAspectFill;
|
|
|
|
return view;
|
|
|
|
}
|
|
|
|
|
|
|
|
RCT_REMAP_VIEW_PROPERTY(defaultImageSrc, defaultImage)
|
|
|
|
RCT_REMAP_VIEW_PROPERTY(src, imageURL)
|
|
|
|
RCT_REMAP_VIEW_PROPERTY(resizeMode, contentMode)
|
|
|
|
|
|
|
|
@end
|