I am new to iOS app development, but I have not been able to find a similar question.
Is it possible to have two or more unique alerts in one controller? I focus on iOS 7.1 and therefore use the following deprecated UIAlertView method:
let errorAlert: UIAlertView = UIAlertView()
errorAlert.delegate = self
errorAlert.message = "Are you sure?"
errorAlert.addButtonWithTitle("Yes")
errorAlert.addButtonWithTitle("No")
errorAlert.show()
This warning goes to a function that contains some logic in the switch statement.
func alertView(View: UIAlertView!, clickedButtonAtIndex buttonIndex: Int) { ...
So far so good, but when I create a second warning inside the same view controller, it also goes into the same function. For example, if I cannot establish a connection to the database, I will show another error message, but this also applies to the above alertView function and is executed through the same switch statement.
Is there an obvious mistake I'm making?
Thanks in advance.