您的位置:首页 > 产品设计 > UI/UE

Photos(PHCollectionListChangeRequest)

2016-01-07 17:17 495 查看
Photos(PHAssetChangeRequest)

Photos(PHAssetCreationRequest)

Photos(PHAssetCollectionChangeRequest)

Photos(PHCollectionListChangeRequest)

PHCollectionListChangeRequest可创建、删除和修改PHCollectionList对象。

1 Adding New Collection Lists

[code]/// 创建PHCollectionList
///
/// - parameter title : PHCollectionList名
///
/// - returns: PHCollectionListChangeRequest
public class func creationRequestForAssetCollectionWithTitle(title: String) -> Self

/// 新创建的PHCollectionList
public var placeholderForCreatedAssetCollection: PHObjectPlaceholder { get }


2 Deleting Collection Lists

[code]/// 删除PHCollectionList
///
/// - parameter collectionLists : [PHCollectionList]
///
/// - returns: void
public class func deleteCollectionLists(collectionLists: NSFastEnumeration)


3 Modifying Collection Lists

[code]/// 通过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)




其他

源代码

Swift

参考资料

Photos Framework Reference

PHAssetCreationRequest Class Reference

文档修改记录

时间描述
2016-01-07博文完成

版权所有

CSDN:http://blog.csdn.net/y550918116j

GitHub:https://github.com/937447974/Blog
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: