mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-24 04:16:00 +08:00
Replaced RCTSparseArray with NSDictionary
Reviewed By: jspahrsummers Differential Revision: D2651920 fb-gh-sync-id: 953e2ea33abfc7a3a553da95b13e9ab2bccc5a1c
This commit is contained in:
committed by
facebook-github-bot-4
parent
5a34a097f2
commit
fa0b45c58b
@@ -34,7 +34,7 @@ RCT_EXPORT_MODULE()
|
||||
completionHandler:(RCTImageLoaderCompletionBlock)completionHandler
|
||||
{
|
||||
CGImageSourceRef imageSource = CGImageSourceCreateWithData((CFDataRef)imageData, NULL);
|
||||
NSDictionary *properties = (__bridge_transfer NSDictionary *)CGImageSourceCopyProperties(imageSource, NULL);
|
||||
NSDictionary<NSString *, id> *properties = (__bridge_transfer NSDictionary *)CGImageSourceCopyProperties(imageSource, NULL);
|
||||
NSUInteger loopCount = [properties[(id)kCGImagePropertyGIFDictionary][(id)kCGImagePropertyGIFLoopCount] unsignedIntegerValue];
|
||||
|
||||
UIImage *image = nil;
|
||||
@@ -51,8 +51,8 @@ RCT_EXPORT_MODULE()
|
||||
image = [UIImage imageWithCGImage:imageRef scale:scale orientation:UIImageOrientationUp];
|
||||
}
|
||||
|
||||
NSDictionary *frameProperties = (__bridge_transfer NSDictionary *)CGImageSourceCopyPropertiesAtIndex(imageSource, i, NULL);
|
||||
NSDictionary *frameGIFProperties = frameProperties[(id)kCGImagePropertyGIFDictionary];
|
||||
NSDictionary<NSString *, id> *frameProperties = (__bridge_transfer NSDictionary *)CGImageSourceCopyPropertiesAtIndex(imageSource, i, NULL);
|
||||
NSDictionary<NSString *, id> *frameGIFProperties = frameProperties[(id)kCGImagePropertyGIFDictionary];
|
||||
|
||||
const NSTimeInterval kDelayTimeIntervalDefault = 0.1;
|
||||
NSNumber *delayTime = frameGIFProperties[(id)kCGImagePropertyGIFUnclampedDelayTime] ?: frameGIFProperties[(id)kCGImagePropertyGIFDelayTime];
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
@implementation RCTImageStoreManager
|
||||
{
|
||||
NSMutableDictionary *_store;
|
||||
NSMutableDictionary<NSString *, UIImage *> *_store;
|
||||
}
|
||||
|
||||
@synthesize methodQueue = _methodQueue;
|
||||
|
||||
@@ -237,7 +237,7 @@ RCT_EXTERN UIImage *RCTDecodeImageWithData(NSData *data,
|
||||
CGFloat maxPixelSize = fmax(fmin(sourceSize.width, targetPixelSize.width),
|
||||
fmin(sourceSize.height, targetPixelSize.height));
|
||||
|
||||
NSDictionary *options = @{
|
||||
NSDictionary<NSString *, NSNumber *> *options = @{
|
||||
(id)kCGImageSourceShouldAllowFloat: @YES,
|
||||
(id)kCGImageSourceCreateThumbnailWithTransform: @YES,
|
||||
(id)kCGImageSourceCreateThumbnailFromImageAlways: @YES,
|
||||
|
||||
Reference in New Issue
Block a user