Something this kind could be useful for you:
let alert = UIAlertController(title: "¡Atention!", message: "Descriptive text", preferredStyle: .actionSheet)
let action = UIAlertAction(title: "Go on", style: .destructive) {_ in
deleteData()
let alertEnd = UIAlertController(title: "Deletion completed", message: "Descriptive text", preferredStyle: .actionSheet)
let action = UIAlertAction(title: "OK", style: .default) {_ in
...action after resetting data, if so}
alertEnd.addAction(action)
self.present(alertEnd, animated: true, completion: nil)
}
alert.addAction(action)
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: {_ in alert.dismiss(animated: true, completion: nil)
}))
self.present(alert, animated: true, completion: nil)