【发布时间】:2019-07-19 11:03:30
【问题描述】:
我想从照片库中获取 1 月 1 日至 5 月 1 日期间的照片 我该怎么做呢
我的代码适用于所有照片:
let options = PHFetchOptions()
options.sortDescriptors = [ NSSortDescriptor(key: "creationDate", ascending: true) ]
options.predicate = NSPredicate(format: "mediaType = %d", PHAssetMediaType.image.rawValue)
let assets = PHAsset.fetchAssets(with: options)
【问题讨论】:
标签: ios swift nspredicate photosframework