Photos(PHChange)
Photos(PHObjectChangeDetails)
Photos(PHFetchResultChangeDetails)
当我们通过PHPhotoLibrary的registerChangeObserver(_ observer: PHPhotoLibraryChangeObserver)
方法监听用户的照片库时,在其回调协议中photoLibraryDidChange(_ changeInstance: PHChange)
通知当前APP。简而言之就是照片库提供PHChange对象来通知应用程序照片库的变动。
/// 判断是否有变化
///
/// - parameter object : PHAsset, PHAssetCollection, or PHCollectionList object.
///
/// - returns: PHObjectChangeDetails
public func changeDetailsForObject(object: PHObject) -> PHObjectChangeDetails?
/// 判断集合是否有变化
///
/// - parameter object : PHFetchResult
///
/// - returns: PHFetchResultChangeDetails
public func changeDetailsForFetchResult(object: PHFetchResult) -> PHFetchResultChangeDetails?
Swift
Photos Framework Reference
PHChange Class Reference
时间 | 描述 |
---|---|
2016-01-05 | 博文完成 |
CSDN:http://blog.csdn.net/y550918116j
GitHub:https://github.com/937447974/Blog