Skip to content

Commit

Permalink
Fix an issue when DFImageMaximumSize wasn't working for PhotosKit
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Mar 27, 2015
1 parent 3d843c4 commit 9d08306
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion DFImageManager/Source/PhotosKit/DFPhotosKitImageFetcher.m
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ - (NSOperation *)startOperationWithRequest:(DFImageRequest *)request progressHan
resource = [((NSURL *)resource) df_assetLocalIdentifier];
}

DFPhotosKitImageFetchOperation *operation = [[DFPhotosKitImageFetchOperation alloc] initWithResource:resource targetSize:request.targetSize contentMode:_PHContentModeForDFContentMode(request.contentMode) options:requestOptions];
CGSize targetSize = CGSizeEqualToSize(DFImageMaximumSize, request.targetSize) ? PHImageManagerMaximumSize : request.targetSize;

DFPhotosKitImageFetchOperation *operation = [[DFPhotosKitImageFetchOperation alloc] initWithResource:resource targetSize:targetSize contentMode:_PHContentModeForDFContentMode(request.contentMode) options:requestOptions];
DFPhotosKitImageFetchOperation *__weak weakOp = operation;
[operation setCompletionBlock:^{
if (completion) {
Expand Down

0 comments on commit 9d08306

Please sign in to comment.