mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Ported TabBarIOS to OSS and unified implementation
This commit is contained in:
@@ -2,9 +2,10 @@
|
||||
|
||||
#import "RCTNetworkImageView.h"
|
||||
|
||||
#import "RCTConvert.h"
|
||||
#import "RCTGIFImage.h"
|
||||
#import "RCTImageDownloader.h"
|
||||
#import "RCTUtils.h"
|
||||
#import "RCTConvert.h"
|
||||
|
||||
@implementation RCTNetworkImageView
|
||||
{
|
||||
@@ -53,7 +54,7 @@
|
||||
if ([imageURL.pathExtension caseInsensitiveCompare:@"gif"] == NSOrderedSame) {
|
||||
_downloadToken = [_imageDownloader downloadDataForURL:imageURL block:^(NSData *data, NSError *error) {
|
||||
if (data) {
|
||||
CAKeyframeAnimation *animation = [RCTConvert GIF:data];
|
||||
CAKeyframeAnimation *animation = RCTGIFImageWithData(data);
|
||||
CGImageRef firstFrame = (__bridge CGImageRef)animation.values.firstObject;
|
||||
self.layer.bounds = CGRectMake(0, 0, CGImageGetWidth(firstFrame), CGImageGetHeight(firstFrame));
|
||||
self.layer.contentsScale = 1.0;
|
||||
|
||||
Reference in New Issue
Block a user