【Swift】保存图片至相册

PHPhotoLibrary.shared().performChanges({

_ = PHAssetChangeRequest.creationRequestForAsset(from: image!)}, completionHandler: { (success, error) in

  if success != true{
      Print("保存失败")
      return
  }
  Print("保存成功")
})

你可能感兴趣的:(【Swift】保存图片至相册)