Photos(PHAssetCreationRequest)
Photos(PHAssetCollectionChangeRequest)
Photos(PHCollectionListChangeRequest)
PHCollectionListChangeRequest可创建、删除和修改PHCollectionList对象。
1 Adding New Collection Lists
/// 创建PHCollectionList
///
/// - parameter title : PHCollectionList名
///
/// - returns: PHCollectionListChangeRequest
public class func creationRequestForAssetCollectionWithTitle(title: String) -> Self
/// 新创建的PHCollectionList
public var placeholderForCreatedAssetCollection: PHObjectPlaceholder { get }
2 Deleting Collection Lists
/// 删除PHCollectionList
///
/// - parameter collectionLists : [PHCollectionList]
///
/// - returns: void
public class func deleteCollectionLists(collectionLists: NSFastEnumeration)
3 Modifying Collection Lists
/// 通过PHCollectionList初始化PHCollectionListChangeRequest
public convenience init?(forCollectionList collectionList: PHCollectionList)
/// 初始化使用PHFetchResult替换PHCollectionList内部数据
public convenience init?(forCollectionList collectionList: PHCollectionList, childCollections: PHFetchResult)
/// 集合名
public var title: String
// A PHCollection can only belong to a single parent PHCollection
/// 增加[PHCollection]
public func addChildCollections(collections: NSFastEnumeration)
/// 插入[PHCollection]
public func insertChildCollections(collections: NSFastEnumeration, atIndexes indexes: NSIndexSet)
/// 删除[PHCollection]
public func removeChildCollections(collections: NSFastEnumeration)
/// 删除指定位置的[PHCollection]
public func removeChildCollectionsAtIndexes(indexes: NSIndexSet)
/// 替换指定位置的[PHCollection]
public func replaceChildCollectionsAtIndexes(indexes: NSIndexSet, withChildCollections collections: NSFastEnumeration)
/// 移动PHCollectionList内部数据
public func moveChildCollectionsAtIndexes(indexes: NSIndexSet, toIndex: Int)
其他
源代码
参考资料
PHAssetCreationRequest Class Reference
文档修改记录
时间 | 描述 |
---|---|
2016-01-07 | 博文完成 |