我将视频保存到相机胶卷的末尾
PHPhotoLibrary.shared().performChanges({
PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: mergedVideoFile!)
}) { saved, error in
if saved {
print("saved")
}
}
答案 0 :(得分:0)
这很容易,您需要在戴Date
的同时传递PHAsset
。
PHPhotoLibrary.shared().performChanges({
let changeRequest = PHAssetChangeRequest.creationRequestForAssetFromVideo(atFileURL: videoUrl)
changeRequest.creationDate = Date() //Pass whichever Date you want
}) { (success, error) in
debugPrint(success)
debugPrint(error)
}