ytakzk / Fusuma

Instagram-like photo browser and a camera feature with a few line of code in Swift.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Library no work

cioletti opened this issue · comments

Fusuma not work multiply selected image in gallery, button done not get images.
Error is in method

private func requestImage(with asset: PHAsset, cropRect: CGRect, completion: @escaping (PHAsset, UIImage) -> Void) {
DispatchQueue.global(qos: .default).async(execute: {
let options = PHImageRequestOptions()
options.deliveryMode = .highQualityFormat
options.isNetworkAccessAllowed = true
options.normalizedCropRect = cropRect
options.resizeMode = .exact

        let targetWidth  = floor(CGFloat(asset.pixelWidth) * cropRect.width)
        let targetHeight = floor(CGFloat(asset.pixelHeight) * cropRect.height)
        let dimensionW   = max(min(targetHeight, targetWidth), 1024 * UIScreen.main.scale)
        let dimensionH   = dimensionW * self.getCropHeightRatio()

        let targetSize   = CGSize(width: dimensionW, height: dimensionH)

        PHImageManager.default().requestImage(for: asset, targetSize: targetSize, contentMode: .aspectFill, options: options) { result, info in
            guard let result = result else { return }

            DispatchQueue.main.async(execute: {
                completion(asset, result)
            })
        }
    })
}

At IOS 13

commented

the same issue for me!

commented

same issue for me.