Supports landscape app screenshots

Rotates landscape screenshots before displaying them. For now, we still assume screenshots have 16:9 aspect ratio.
This commit is contained in:
Riley Testut
2022-04-11 11:59:56 -07:00
parent 73ff5fe9dc
commit 6db5aec672
4 changed files with 33 additions and 2 deletions

View File

@@ -138,7 +138,8 @@ private extension AppContentViewController
}
dataSource.prefetchHandler = { (imageURL, indexPath, completionHandler) in
return RSTAsyncBlockOperation() { (operation) in
ImagePipeline.shared.loadImage(with: imageURL as URL, progress: nil, completion: { (response, error) in
let request = ImageRequest(url: imageURL as URL, processor: .screenshot)
ImagePipeline.shared.loadImage(with: request, progress: nil, completion: { (response, error) in
guard !operation.isCancelled else { return operation.finish() }
if let image = response?.image