I\'m presenting an UIAlertViewController without any buttons, as it is supposed to just inform users that uploading is in progress. The app is supposed to upload some files
If you want to post an alert that displays briefly, then dismisses itself, you could use the following method:
func postAlert(title: String, message: String) {
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
self.present(alert, animated: true, completion: nil)
// delays execution of code to dismiss
DispatchQueue.main.asyncAfter(deadline: .now() + 2.0, execute: {
alert.dismiss(animated: true, completion: nil)
})
}