PHPhotoLibrary.shared().performChanges({
_ = PHAssetChangeRequest.creationRequestForAsset(from: image!)}, completionHandler: { (success, error) in
if success != true{
Print("保存失败")
return
}
Print("保存成功")
})
PHPhotoLibrary.shared().performChanges({
_ = PHAssetChangeRequest.creationRequestForAsset(from: image!)}, completionHandler: { (success, error) in
if success != true{
Print("保存失败")
return
}
Print("保存成功")
})
本文标题:【Swift】保存图片至相册
本文链接:https://www.haomeiwen.com/subject/pbdsuxtx.html
网友评论