tilltue / TLPhotoPicker

📷 multiple phassets picker for iOS lib. like a facebook
MIT License
1.89k stars 332 forks source link

Dear Author, can I get the special ratio with NSPredicate ? #347

Open brandy2015 opened 1 year ago

brandy2015 commented 1 year ago

let options = PHFetchOptions() options.predicate = NSPredicate(format: "pixelHeight / pixelWidth == %d", 2) configure.fetchOption = options

It doesn't work.

Wanna get 1:2 pixelHeight : pixelWidth

brandy2015 commented 1 year ago

func canSelectAsset(phAsset: PHAsset) -> Bool { if (phAsset.pixelWidth / phAsset.pixelHeight) == 2 || (Double(phAsset.pixelWidth) / Double(phAsset.pixelHeight)) == 0.5{ return true } }

it's not enough