I am new to Swift, and I have questions regarding how to present Alert Window one by one after the user clicks the button(dismiss). So I could have the second the window pops out right after users click the button to dismiss the alert? So far, I tried I can't display them together by trying:
self.createAlert(title: " 1", message: "1")
self.createAlert(title: " 2",message: "2")
And I would get error message:
[Presentation] Attempt to present <UIAlertController: 0x7f9e4380b800> on <UITabBarController: 0x7f9e43059000> (from <IFTTT.HomePageViewController: 0x7f9e41c17be0>) which is already presenting <UIAlertController: 0x7f9e4280b000>.
Can someone introduce me to some techniques to solve this? Like a boolean function to know if the last window is closed or something more efficient. Thank you!!