Sometimes my application crashes when two UIAlertViewstry to be presented at the same time. How to check if another is displayed UIAlertviewbefore showing another?
UIAlertViews
UIAlertview
Here is what I tried, but it does not work.
Note. I am using quick for this project.
if ViewController.isVisable == false { self.presentViewController(AlertView, animated: true, completion: nil) }
As a strict answer to your question, you can check if a window has ViewControllerits window:
ViewController
if ViewController.view.window != nil { }
In any case, I recommend you take @Wain's advice.
. , , , , /, / . , , , ( , ).
, , , , (, , /).