浏览代码

Switched response queue to be a serial queue
Fixed the tvOS image size in the example

Kevin Harwood 10 年之前
父节点
当前提交
280c3750b0
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      Example/tvOS Example/ViewController.swift
  2. 1 1
      UIKit+AFNetworking/AFImageDownloader.m

+ 1 - 1
Example/tvOS Example/ViewController.swift

@@ -60,7 +60,7 @@ class CollectionViewCell : UICollectionViewCell {
     }
 
     func update(forGravatar gravatar:Gravatar) {
-        self.avatarView.setImageWithURL(gravatar.URL(size: self.avatarView.bounds.size.width))
+        self.avatarView.setImageWithURL(gravatar.URL(size: self.bounds.size.width))
     }
 }
 

+ 1 - 1
UIKit+AFNetworking/AFImageDownloader.m

@@ -156,7 +156,7 @@
         self.activeRequestCount = 0;
 
         NSString *name = [NSString stringWithFormat:@"com.alamofire.imagedownloader.synchronizationqueue-%@", [[NSUUID UUID] UUIDString]];
-        self.synchronizationQueue = dispatch_queue_create([name cStringUsingEncoding:NSASCIIStringEncoding], DISPATCH_QUEUE_CONCURRENT);
+        self.synchronizationQueue = dispatch_queue_create([name cStringUsingEncoding:NSASCIIStringEncoding], DISPATCH_QUEUE_SERIAL);
 
         name = [NSString stringWithFormat:@"com.alamofire.imagedownloader.responsequeue-%@", [[NSUUID UUID] UUIDString]];
         self.responseQueue = dispatch_queue_create([name cStringUsingEncoding:NSASCIIStringEncoding], DISPATCH_QUEUE_CONCURRENT);