Authored by Olivier Poitrey

Merge pull request #603 from akhenakh/64bits_support

64bits support (fix #572, fix #504, fix #494)
@@ -16,8 +16,9 @@ It provides: @@ -16,8 +16,9 @@ It provides:
16 - A guarantee that main thread will never be blocked 16 - A guarantee that main thread will never be blocked
17 - Performances! 17 - Performances!
18 - Use GCD and ARC 18 - Use GCD and ARC
  19 +- Arm64 support
19 20
20 -NOTE: The version 3.0 of SDWebImage isn't fully backward compatible with 2.0 and requires iOS 5.0 21 +NOTE: The version 3.0 of SDWebImage isn't fully backward compatible with 2.0 and requires iOS 5.1.1
21 minimum deployement version. If you need iOS < 5.0 support, please use the last [2.0 version](https://github.com/rs/SDWebImage/tree/2.0-compat). 22 minimum deployement version. If you need iOS < 5.0 support, please use the last [2.0 version](https://github.com/rs/SDWebImage/tree/2.0-compat).
22 23
23 [How is SDWebImage better than X?](https://github.com/rs/SDWebImage/wiki/How-is-SDWebImage-better-than-X%3F) 24 [How is SDWebImage better than X?](https://github.com/rs/SDWebImage/wiki/How-is-SDWebImage-better-than-X%3F)
@@ -835,6 +835,7 @@ @@ -835,6 +835,7 @@
835 531041DE157EAFA400BBABC3 /* Debug */ = { 835 531041DE157EAFA400BBABC3 /* Debug */ = {
836 isa = XCBuildConfiguration; 836 isa = XCBuildConfiguration;
837 buildSettings = { 837 buildSettings = {
  838 + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
838 CLANG_ENABLE_OBJC_ARC = YES; 839 CLANG_ENABLE_OBJC_ARC = YES;
839 COPY_PHASE_STRIP = NO; 840 COPY_PHASE_STRIP = NO;
840 DEAD_CODE_STRIPPING = NO; 841 DEAD_CODE_STRIPPING = NO;
@@ -848,6 +849,7 @@ @@ -848,6 +849,7 @@
848 GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)"; 849 GCC_PREPROCESSOR_DEFINITIONS = "$(inherited)";
849 INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)"; 850 INSTALL_PATH = "$(BUILT_PRODUCTS_DIR)";
850 IPHONEOS_DEPLOYMENT_TARGET = 5.0; 851 IPHONEOS_DEPLOYMENT_TARGET = 5.0;
  852 + ONLY_ACTIVE_ARCH = NO;
851 OTHER_LDFLAGS = "-ObjC"; 853 OTHER_LDFLAGS = "-ObjC";
852 PRODUCT_NAME = "SDWebImage+MKAnnotation"; 854 PRODUCT_NAME = "SDWebImage+MKAnnotation";
853 SKIP_INSTALL = YES; 855 SKIP_INSTALL = YES;
@@ -858,6 +860,7 @@ @@ -858,6 +860,7 @@
858 531041DF157EAFA400BBABC3 /* Release */ = { 860 531041DF157EAFA400BBABC3 /* Release */ = {
859 isa = XCBuildConfiguration; 861 isa = XCBuildConfiguration;
860 buildSettings = { 862 buildSettings = {
  863 + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
861 CLANG_ENABLE_OBJC_ARC = YES; 864 CLANG_ENABLE_OBJC_ARC = YES;
862 COPY_PHASE_STRIP = NO; 865 COPY_PHASE_STRIP = NO;
863 DEAD_CODE_STRIPPING = NO; 866 DEAD_CODE_STRIPPING = NO;
@@ -881,6 +884,7 @@ @@ -881,6 +884,7 @@
881 53761323155AD0D5005750A4 /* Debug */ = { 884 53761323155AD0D5005750A4 /* Debug */ = {
882 isa = XCBuildConfiguration; 885 isa = XCBuildConfiguration;
883 buildSettings = { 886 buildSettings = {
  887 + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
884 CLANG_ENABLE_OBJC_ARC = YES; 888 CLANG_ENABLE_OBJC_ARC = YES;
885 COPY_PHASE_STRIP = NO; 889 COPY_PHASE_STRIP = NO;
886 DEAD_CODE_STRIPPING = NO; 890 DEAD_CODE_STRIPPING = NO;
@@ -904,6 +908,7 @@ @@ -904,6 +908,7 @@
904 53761324155AD0D5005750A4 /* Release */ = { 908 53761324155AD0D5005750A4 /* Release */ = {
905 isa = XCBuildConfiguration; 909 isa = XCBuildConfiguration;
906 buildSettings = { 910 buildSettings = {
  911 + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
907 CLANG_ENABLE_OBJC_ARC = YES; 912 CLANG_ENABLE_OBJC_ARC = YES;
908 COPY_PHASE_STRIP = NO; 913 COPY_PHASE_STRIP = NO;
909 DEAD_CODE_STRIPPING = NO; 914 DEAD_CODE_STRIPPING = NO;
@@ -927,6 +932,7 @@ @@ -927,6 +932,7 @@
927 537D95BF17ECC1FE0097C263 /* Debug */ = { 932 537D95BF17ECC1FE0097C263 /* Debug */ = {
928 isa = XCBuildConfiguration; 933 isa = XCBuildConfiguration;
929 buildSettings = { 934 buildSettings = {
  935 + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
930 CLANG_ENABLE_OBJC_ARC = YES; 936 CLANG_ENABLE_OBJC_ARC = YES;
931 COPY_PHASE_STRIP = NO; 937 COPY_PHASE_STRIP = NO;
932 DEAD_CODE_STRIPPING = NO; 938 DEAD_CODE_STRIPPING = NO;
@@ -954,6 +960,7 @@ @@ -954,6 +960,7 @@
954 537D95C017ECC1FE0097C263 /* Release */ = { 960 537D95C017ECC1FE0097C263 /* Release */ = {
955 isa = XCBuildConfiguration; 961 isa = XCBuildConfiguration;
956 buildSettings = { 962 buildSettings = {
  963 + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
957 CLANG_ENABLE_OBJC_ARC = YES; 964 CLANG_ENABLE_OBJC_ARC = YES;
958 COPY_PHASE_STRIP = NO; 965 COPY_PHASE_STRIP = NO;
959 DEAD_CODE_STRIPPING = NO; 966 DEAD_CODE_STRIPPING = NO;
@@ -978,6 +985,7 @@ @@ -978,6 +985,7 @@
978 isa = XCBuildConfiguration; 985 isa = XCBuildConfiguration;
979 buildSettings = { 986 buildSettings = {
980 ALWAYS_SEARCH_USER_PATHS = NO; 987 ALWAYS_SEARCH_USER_PATHS = NO;
  988 + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
981 COPY_PHASE_STRIP = NO; 989 COPY_PHASE_STRIP = NO;
982 GCC_DYNAMIC_NO_PIC = NO; 990 GCC_DYNAMIC_NO_PIC = NO;
983 GCC_OPTIMIZATION_LEVEL = 0; 991 GCC_OPTIMIZATION_LEVEL = 0;
@@ -1001,7 +1009,7 @@ @@ -1001,7 +1009,7 @@
1001 GCC_WARN_UNUSED_PARAMETER = NO; 1009 GCC_WARN_UNUSED_PARAMETER = NO;
1002 GCC_WARN_UNUSED_VARIABLE = YES; 1010 GCC_WARN_UNUSED_VARIABLE = YES;
1003 HEADER_SEARCH_PATHS = Vendors/libwebp/src; 1011 HEADER_SEARCH_PATHS = Vendors/libwebp/src;
1004 - IPHONEOS_DEPLOYMENT_TARGET = 5.0; 1012 + IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
1005 PUBLIC_HEADERS_FOLDER_PATH = include/SDWebImage; 1013 PUBLIC_HEADERS_FOLDER_PATH = include/SDWebImage;
1006 RUN_CLANG_STATIC_ANALYZER = YES; 1014 RUN_CLANG_STATIC_ANALYZER = YES;
1007 SDKROOT = iphoneos; 1015 SDKROOT = iphoneos;
@@ -1012,6 +1020,7 @@ @@ -1012,6 +1020,7 @@
1012 isa = XCBuildConfiguration; 1020 isa = XCBuildConfiguration;
1013 buildSettings = { 1021 buildSettings = {
1014 ALWAYS_SEARCH_USER_PATHS = NO; 1022 ALWAYS_SEARCH_USER_PATHS = NO;
  1023 + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
1015 COPY_PHASE_STRIP = YES; 1024 COPY_PHASE_STRIP = YES;
1016 GCC_PREPROCESSOR_DEFINITIONS = ""; 1025 GCC_PREPROCESSOR_DEFINITIONS = "";
1017 GCC_TREAT_WARNINGS_AS_ERRORS = YES; 1026 GCC_TREAT_WARNINGS_AS_ERRORS = YES;
@@ -1029,7 +1038,7 @@ @@ -1029,7 +1038,7 @@
1029 GCC_WARN_UNUSED_PARAMETER = NO; 1038 GCC_WARN_UNUSED_PARAMETER = NO;
1030 GCC_WARN_UNUSED_VARIABLE = YES; 1039 GCC_WARN_UNUSED_VARIABLE = YES;
1031 HEADER_SEARCH_PATHS = Vendors/libwebp/src; 1040 HEADER_SEARCH_PATHS = Vendors/libwebp/src;
1032 - IPHONEOS_DEPLOYMENT_TARGET = 5.0; 1041 + IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
1033 PUBLIC_HEADERS_FOLDER_PATH = include/SDWebImage; 1042 PUBLIC_HEADERS_FOLDER_PATH = include/SDWebImage;
1034 RUN_CLANG_STATIC_ANALYZER = YES; 1043 RUN_CLANG_STATIC_ANALYZER = YES;
1035 SDKROOT = iphoneos; 1044 SDKROOT = iphoneos;
@@ -1040,6 +1049,8 @@ @@ -1040,6 +1049,8 @@
1040 539F912D16316D2D00160719 /* Debug */ = { 1049 539F912D16316D2D00160719 /* Debug */ = {
1041 isa = XCBuildConfiguration; 1050 isa = XCBuildConfiguration;
1042 buildSettings = { 1051 buildSettings = {
  1052 + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
  1053 + IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
1043 PRODUCT_NAME = "$(TARGET_NAME)"; 1054 PRODUCT_NAME = "$(TARGET_NAME)";
1044 }; 1055 };
1045 name = Debug; 1056 name = Debug;
@@ -1047,6 +1058,8 @@ @@ -1047,6 +1058,8 @@
1047 539F912E16316D2D00160719 /* Release */ = { 1058 539F912E16316D2D00160719 /* Release */ = {
1048 isa = XCBuildConfiguration; 1059 isa = XCBuildConfiguration;
1049 buildSettings = { 1060 buildSettings = {
  1061 + ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)";
  1062 + IPHONEOS_DEPLOYMENT_TARGET = 5.1.1;
1050 PRODUCT_NAME = "$(TARGET_NAME)"; 1063 PRODUCT_NAME = "$(TARGET_NAME)";
1051 }; 1064 };
1052 name = Release; 1065 name = Release;
@@ -45,7 +45,7 @@ typedef enum SDImageCacheType SDImageCacheType; @@ -45,7 +45,7 @@ typedef enum SDImageCacheType SDImageCacheType;
45 /** 45 /**
46 * The maximum size of the cache, in bytes. 46 * The maximum size of the cache, in bytes.
47 */ 47 */
48 -@property (assign, nonatomic) unsigned long long maxCacheSize; 48 +@property (assign, nonatomic) NSUInteger maxCacheSize;
49 49
50 /** 50 /**
51 * Returns global shared cache instance 51 * Returns global shared cache instance
@@ -153,7 +153,7 @@ typedef enum SDImageCacheType SDImageCacheType; @@ -153,7 +153,7 @@ typedef enum SDImageCacheType SDImageCacheType;
153 /** 153 /**
154 * Get the size used by the disk cache 154 * Get the size used by the disk cache
155 */ 155 */
156 -- (unsigned long long)getSize; 156 +- (NSUInteger)getSize;
157 157
158 /** 158 /**
159 * Get the number of images in the disk cache 159 * Get the number of images in the disk cache
@@ -163,7 +163,7 @@ typedef enum SDImageCacheType SDImageCacheType; @@ -163,7 +163,7 @@ typedef enum SDImageCacheType SDImageCacheType;
163 /** 163 /**
164 * Asynchronously calculate the disk cache's size. 164 * Asynchronously calculate the disk cache's size.
165 */ 165 */
166 -- (void)calculateSizeWithCompletionBlock:(void (^)(NSUInteger fileCount, unsigned long long totalSize))completionBlock; 166 +- (void)calculateSizeWithCompletionBlock:(void (^)(NSUInteger fileCount, NSUInteger totalSize))completionBlock;
167 167
168 /** 168 /**
169 * Check if image exists in cache already 169 * Check if image exists in cache already
@@ -423,7 +423,7 @@ BOOL ImageDataHasPNGPreffix(NSData *data) @@ -423,7 +423,7 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
423 423
424 NSDate *expirationDate = [NSDate dateWithTimeIntervalSinceNow:-self.maxCacheAge]; 424 NSDate *expirationDate = [NSDate dateWithTimeIntervalSinceNow:-self.maxCacheAge];
425 NSMutableDictionary *cacheFiles = [NSMutableDictionary dictionary]; 425 NSMutableDictionary *cacheFiles = [NSMutableDictionary dictionary];
426 - unsigned long long currentCacheSize = 0; 426 + NSUInteger currentCacheSize = 0;
427 427
428 // Enumerate all of the files in the cache directory. This loop has two purposes: 428 // Enumerate all of the files in the cache directory. This loop has two purposes:
429 // 429 //
@@ -449,7 +449,7 @@ BOOL ImageDataHasPNGPreffix(NSData *data) @@ -449,7 +449,7 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
449 449
450 // Store a reference to this file and account for its total size. 450 // Store a reference to this file and account for its total size.
451 NSNumber *totalAllocatedSize = resourceValues[NSURLTotalFileAllocatedSizeKey]; 451 NSNumber *totalAllocatedSize = resourceValues[NSURLTotalFileAllocatedSizeKey];
452 - currentCacheSize += [totalAllocatedSize unsignedLongLongValue]; 452 + currentCacheSize += [totalAllocatedSize unsignedIntegerValue];
453 [cacheFiles setObject:resourceValues forKey:fileURL]; 453 [cacheFiles setObject:resourceValues forKey:fileURL];
454 } 454 }
455 455
@@ -458,7 +458,7 @@ BOOL ImageDataHasPNGPreffix(NSData *data) @@ -458,7 +458,7 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
458 if (self.maxCacheSize > 0 && currentCacheSize > self.maxCacheSize) 458 if (self.maxCacheSize > 0 && currentCacheSize > self.maxCacheSize)
459 { 459 {
460 // Target half of our maximum cache size for this cleanup pass. 460 // Target half of our maximum cache size for this cleanup pass.
461 - const unsigned long long desiredCacheSize = self.maxCacheSize / 2; 461 + const NSUInteger desiredCacheSize = self.maxCacheSize / 2;
462 462
463 // Sort the remaining cache files by their last modification time (oldest first). 463 // Sort the remaining cache files by their last modification time (oldest first).
464 NSArray *sortedFiles = [cacheFiles keysSortedByValueWithOptions:NSSortConcurrent 464 NSArray *sortedFiles = [cacheFiles keysSortedByValueWithOptions:NSSortConcurrent
@@ -474,7 +474,7 @@ BOOL ImageDataHasPNGPreffix(NSData *data) @@ -474,7 +474,7 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
474 { 474 {
475 NSDictionary *resourceValues = cacheFiles[fileURL]; 475 NSDictionary *resourceValues = cacheFiles[fileURL];
476 NSNumber *totalAllocatedSize = resourceValues[NSURLTotalFileAllocatedSizeKey]; 476 NSNumber *totalAllocatedSize = resourceValues[NSURLTotalFileAllocatedSizeKey];
477 - currentCacheSize -= [totalAllocatedSize unsignedLongLongValue]; 477 + currentCacheSize -= [totalAllocatedSize unsignedIntegerValue];
478 478
479 if (currentCacheSize < desiredCacheSize) 479 if (currentCacheSize < desiredCacheSize)
480 { 480 {
@@ -508,9 +508,9 @@ BOOL ImageDataHasPNGPreffix(NSData *data) @@ -508,9 +508,9 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
508 }); 508 });
509 } 509 }
510 510
511 -- (unsigned long long)getSize 511 +- (NSUInteger)getSize
512 { 512 {
513 - unsigned long long size = 0; 513 + NSUInteger size = 0;
514 NSDirectoryEnumerator *fileEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:self.diskCachePath]; 514 NSDirectoryEnumerator *fileEnumerator = [[NSFileManager defaultManager] enumeratorAtPath:self.diskCachePath];
515 for (NSString *fileName in fileEnumerator) 515 for (NSString *fileName in fileEnumerator)
516 { 516 {
@@ -533,14 +533,14 @@ BOOL ImageDataHasPNGPreffix(NSData *data) @@ -533,14 +533,14 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
533 return count; 533 return count;
534 } 534 }
535 535
536 -- (void)calculateSizeWithCompletionBlock:(void (^)(NSUInteger fileCount, unsigned long long totalSize))completionBlock 536 +- (void)calculateSizeWithCompletionBlock:(void (^)(NSUInteger fileCount, NSUInteger totalSize))completionBlock
537 { 537 {
538 NSURL *diskCacheURL = [NSURL fileURLWithPath:self.diskCachePath isDirectory:YES]; 538 NSURL *diskCacheURL = [NSURL fileURLWithPath:self.diskCachePath isDirectory:YES];
539 539
540 dispatch_async(self.ioQueue, ^ 540 dispatch_async(self.ioQueue, ^
541 { 541 {
542 NSUInteger fileCount = 0; 542 NSUInteger fileCount = 0;
543 - unsigned long long totalSize = 0; 543 + NSUInteger totalSize = 0;
544 544
545 NSFileManager *fileManager = [NSFileManager defaultManager]; 545 NSFileManager *fileManager = [NSFileManager defaultManager];
546 NSDirectoryEnumerator *fileEnumerator = [fileManager enumeratorAtURL:diskCacheURL 546 NSDirectoryEnumerator *fileEnumerator = [fileManager enumeratorAtURL:diskCacheURL
@@ -552,7 +552,7 @@ BOOL ImageDataHasPNGPreffix(NSData *data) @@ -552,7 +552,7 @@ BOOL ImageDataHasPNGPreffix(NSData *data)
552 { 552 {
553 NSNumber *fileSize; 553 NSNumber *fileSize;
554 [fileURL getResourceValue:&fileSize forKey:NSURLFileSizeKey error:NULL]; 554 [fileURL getResourceValue:&fileSize forKey:NSURLFileSizeKey error:NULL];
555 - totalSize += [fileSize unsignedLongLongValue]; 555 + totalSize += [fileSize unsignedIntegerValue];
556 fileCount += 1; 556 fileCount += 1;
557 } 557 }
558 558
@@ -57,7 +57,7 @@ typedef enum @@ -57,7 +57,7 @@ typedef enum
57 extern NSString *const SDWebImageDownloadStartNotification; 57 extern NSString *const SDWebImageDownloadStartNotification;
58 extern NSString *const SDWebImageDownloadStopNotification; 58 extern NSString *const SDWebImageDownloadStopNotification;
59 59
60 -typedef void(^SDWebImageDownloaderProgressBlock)(NSUInteger receivedSize, long long expectedSize); 60 +typedef void(^SDWebImageDownloaderProgressBlock)(NSUInteger receivedSize, NSUInteger expectedSize);
61 typedef void(^SDWebImageDownloaderCompletedBlock)(UIImage *image, NSData *data, NSError *error, BOOL finished); 61 typedef void(^SDWebImageDownloaderCompletedBlock)(UIImage *image, NSData *data, NSError *error, BOOL finished);
62 62
63 /** 63 /**
@@ -115,7 +115,7 @@ static NSString *const kCompletedCallbackKey = @"completed"; @@ -115,7 +115,7 @@ static NSString *const kCompletedCallbackKey = @"completed";
115 return _downloadQueue.maxConcurrentOperationCount; 115 return _downloadQueue.maxConcurrentOperationCount;
116 } 116 }
117 117
118 -- (id<SDWebImageOperation>)downloadImageWithURL:(NSURL *)url options:(SDWebImageDownloaderOptions)options progress:(void (^)(NSUInteger, long long))progressBlock completed:(void (^)(UIImage *, NSData *, NSError *, BOOL))completedBlock 118 +- (id<SDWebImageOperation>)downloadImageWithURL:(NSURL *)url options:(SDWebImageDownloaderOptions)options progress:(void (^)(NSUInteger, NSUInteger))progressBlock completed:(void (^)(UIImage *, NSData *, NSError *, BOOL))completedBlock
119 { 119 {
120 __block SDWebImageDownloaderOperation *operation; 120 __block SDWebImageDownloaderOperation *operation;
121 __weak SDWebImageDownloader *wself = self; 121 __weak SDWebImageDownloader *wself = self;
@@ -139,7 +139,7 @@ static NSString *const kCompletedCallbackKey = @"completed"; @@ -139,7 +139,7 @@ static NSString *const kCompletedCallbackKey = @"completed";
139 { 139 {
140 request.allHTTPHeaderFields = wself.HTTPHeaders; 140 request.allHTTPHeaderFields = wself.HTTPHeaders;
141 } 141 }
142 - operation = [SDWebImageDownloaderOperation.alloc initWithRequest:request options:options progress:^(NSUInteger receivedSize, long long expectedSize) 142 + operation = [SDWebImageDownloaderOperation.alloc initWithRequest:request options:options progress:^(NSUInteger receivedSize, NSUInteger expectedSize)
143 { 143 {
144 if (!wself) return; 144 if (!wself) return;
145 SDWebImageDownloader *sself = wself; 145 SDWebImageDownloader *sself = wself;
@@ -183,7 +183,7 @@ static NSString *const kCompletedCallbackKey = @"completed"; @@ -183,7 +183,7 @@ static NSString *const kCompletedCallbackKey = @"completed";
183 return operation; 183 return operation;
184 } 184 }
185 185
186 -- (void)addProgressCallback:(void (^)(NSUInteger, long long))progressBlock andCompletedBlock:(void (^)(UIImage *, NSData *data, NSError *, BOOL))completedBlock forURL:(NSURL *)url createCallback:(void (^)())createCallback 186 +- (void)addProgressCallback:(void (^)(NSUInteger, NSUInteger))progressBlock andCompletedBlock:(void (^)(UIImage *, NSData *data, NSError *, BOOL))completedBlock forURL:(NSURL *)url createCallback:(void (^)())createCallback
187 { 187 {
188 // The URL will be used as the key to the callbacks dictionary so it cannot be nil. If it is nil immediately call the completed block with no image or data. 188 // The URL will be used as the key to the callbacks dictionary so it cannot be nil. If it is nil immediately call the completed block with no image or data.
189 if(url == nil) 189 if(url == nil)
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
19 19
20 @property (assign, nonatomic, getter = isExecuting) BOOL executing; 20 @property (assign, nonatomic, getter = isExecuting) BOOL executing;
21 @property (assign, nonatomic, getter = isFinished) BOOL finished; 21 @property (assign, nonatomic, getter = isFinished) BOOL finished;
22 -@property (assign, nonatomic) long long expectedSize; 22 +@property (assign, nonatomic) NSUInteger expectedSize;
23 @property (strong, nonatomic) NSMutableData *imageData; 23 @property (strong, nonatomic) NSMutableData *imageData;
24 @property (strong, nonatomic) NSURLConnection *connection; 24 @property (strong, nonatomic) NSURLConnection *connection;
25 @property (strong, atomic) NSThread *thread; 25 @property (strong, atomic) NSThread *thread;
@@ -36,7 +36,7 @@ @@ -36,7 +36,7 @@
36 BOOL responseFromCached; 36 BOOL responseFromCached;
37 } 37 }
38 38
39 -- (id)initWithRequest:(NSURLRequest *)request options:(SDWebImageDownloaderOptions)options progress:(void (^)(NSUInteger, long long))progressBlock completed:(void (^)(UIImage *, NSData *, NSError *, BOOL))completedBlock cancelled:(void (^)())cancelBlock 39 +- (id)initWithRequest:(NSURLRequest *)request options:(SDWebImageDownloaderOptions)options progress:(void (^)(NSUInteger, NSUInteger))progressBlock completed:(void (^)(UIImage *, NSData *, NSError *, BOOL))completedBlock cancelled:(void (^)())cancelBlock
40 { 40 {
41 if ((self = [super init])) 41 if ((self = [super init]))
42 { 42 {