Ios 使用PhotoKit在文件夹中创建子文件夹
我了解如何使用Apple的PhotoKit API以编程方式创建文件夹,并将照片添加到文件夹中Ios 使用PhotoKit在文件夹中创建子文件夹,ios,iphone,photokit,phphotolibrary,Ios,Iphone,Photokit,Phphotolibrary,我了解如何使用Apple的PhotoKit API以编程方式创建文件夹,并将照片添加到文件夹中 PHPhotoLibrary.shared().performChanges({ let req = PHAssetCollectionChangeRequest.creationRequestForAssetCollection(withTitle: "FolderName") }, completionHandler: { success, error in
PHPhotoLibrary.shared().performChanges({
let req = PHAssetCollectionChangeRequest.creationRequestForAssetCollection(withTitle: "FolderName")
}, completionHandler: { success, error in
if !success { print("Error creating album: \(String(describing: error)).") }
})
有没有办法使用PhotoKit在该文件夹中创建子文件夹?
调用creationRequestForCollectionList(标题:)
方法创建新的资产集合
调用deleteCollectionList(:)
方法删除现有资产集合
调用
init(for:)或init(for:childCollections:)
方法修改集合的元数据或其子集合列表。目前,Apple是用于创建单个相册的公开api。
即使手动,您也无法从设备的另一个文件夹中创建文件夹。您可以尝试以下方法: