PhilippeBoisney / AlertOnboarding

A simple and attractive AlertView to onboard your users in your amazing world.
MIT License
842 stars 109 forks source link

Showing without pressing button #25

Open Aonemedia opened 6 years ago

Aonemedia commented 6 years ago

Hello. How can I show this without pressing a button in the first page? Actually I wrote self.alertView.show() in viewDidLoad() but it does not work. I would appreciate it if you could help me to do it.

PhilippeBoisney commented 6 years ago

If you want to show the AlertOnboarding view without clicking on the button, put self.alertView.show() in viewWillAppear() or viewDidAppear(). It should work.

Aonemedia commented 6 years ago

Hi. Thank you so much for your helping. It works properly.

francisjervis commented 6 years ago

I also encountered this issue; thanks for the clarification. However, only calling show() from viewDidAppear worked - presumably because the show() function requires the top view controller to be in the view hierarchy before it can get it?