PHFetchOptions仅包含来自iPhone相机的照片

时间:2018-03-27 07:03:54

标签: ios swift swift4 phasset phfetchoptions

现在我用它来排除屏幕截图:

let options = PHFetchOptions()
options.predicate = NSPredicate(format: "NOT (mediaSubtype & \(PHAssetMediaSubtype.photoScreenshot.rawValue) != 0)")
var fetchResult: PHFetchResult<PHAsset> = fetchResult = 
PHAsset.fetchAssets(with: PHAssetMediaType.image, options: options)

但我想只包括从iPhone相机中拍摄的照片(不包括从Skype等其他应用程序中保存的照片)。有可能吗?

0 个答案:

没有答案