ytakzk / Fusuma

Instagram-like photo browser and a camera feature with a few line of code in Swift.
MIT License
2.46k stars 340 forks source link

Library no work #299

Open cioletti opened 5 years ago

cioletti commented 5 years ago

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)
            })
        }
    })
}
cioletti commented 5 years ago

At IOS 13

BossOz commented 5 years ago

the same issue for me!

siang-chang commented 4 years ago

same issue for me.