thellimist / EZAlertController

Easy Swift UIAlertController
MIT License
366 stars 50 forks source link

Crash if showed the alert in View Did Load #5

Closed hamdshah closed 8 years ago

hamdshah commented 8 years ago

Created test-app and put the alert in "viewDidLoad"

screen shot 2015-11-20 at 5 34 16 pm

Esqarrouth commented 8 years ago

What happens when you move it to viewdidappear?

When you put it in viewDidLoad, you are basically telling the app to create the view, on a window that does not exist yet. Still I can fix this so it doesn't crash, but it won't show up either. Maybe I can make a counter and check when the view loads and show it accordingly

hamdshah commented 8 years ago

Yes exactly that's the issue. It works in the "viewDidAppear".

thellimist commented 8 years ago

Fixed https://github.com/thellimist/EZAlertController/commit/7ef7f53d2ec92347a727f945b67677fea20cfd51