【发布时间】:2018-02-20 11:59:27
【问题描述】:
我可以将视频文件移至照片的根目录,但我想将其移至特定相册(使用localIdentifier)
将视频文件移动到照片根目录的功能(需要对其进行编辑以移动到特定的照片相册-localIdentifier)
PHPhotoLibrary.shared().performChanges({
print("performChanges")
let options = PHAssetResourceCreationOptions()
options.shouldMoveFile = true
let creationRequest = PHAssetCreationRequest.forAsset()
creationRequest.addResource(with: .video, fileURL: self._VideoFileURL, options: options)
}, completionHandler: { success, error in
if !success {
print("Could not save movie to photo library: \(String(describing: error))")
} else {
print("Saved movie to photo library")
}
}
【问题讨论】:
-
找到解决方案stackoverflow.com/a/44669385/4548520作者在我给他写信时更新了它