When I start my iPad app, I want to display a screen that slides in on top of the main view that is there at the start up. I want this screen to take up the entire screen and display a web page, and the only way that the user can get out of it is click on a UIButton at the bottom of the screen.
Right now, I am setting the view of my main view controller as the view that I want to display, but the next step in execution is showing a UIAlert, and this alert is appearing.
What can I use to have this pop up wait for the user to click Agree before continuing?
Thanks.
You will want to use a delegate.
So to do what you want do something like this (I don’t know your actual class names, so I’m guessing):
In your AlertScreenViewController.h file add this code:
Then in your AlertScreenViewController.m file:
add this:
add this code wherever your button is pressed:
In your MainViewController.h file add this:
In your MainViewController.m file add this:
Wherever you’ve loaded up the AlertScreenViewController add this after the init call:
Then move all code after the display of the alertscreenviewcontroller code to this method:
You can find another example here: http://www.dosomethinghere.com/2009/07/18/setting-up-a-delegate-in-the-iphone-sdk/
Or just google iphone sdk delegate