Swift: UIAlert in function - Use of unresolved identifier 'present'
问题 I'm trying to limit the show of code so I just want to call function containing two strings to create a uialert faster with 1 line instead of 5/ The error I'm getting Use of unresolved identifier 'present' at the line present(alert, animated: true, completion: nil) // Controlling Alerts for Errors func showAlert(titleString: String, messageString: String) { // Alert to go to Settings let alert = UIAlertController(title: titleString, message: messageString, preferredStyle: .alert) alert