How do I make a UIAlertView happen only on the first start-up of an iPhone app?
Posted
by user309245
on Stack Overflow
See other posts from Stack Overflow
or by user309245
Published on 2010-04-05T14:16:49Z
Indexed on
2010/04/05
14:23 UTC
Read the original article
Hit count: 224
I'm using the UIAlertView to make a pop-up happen once the app has started up. It works fine but I only want the pop up to happen on the first start-up of the app. At the moment I've got the UIAlertView in the AppDelegate class, after the application didFinishLaunching. Here is my code at the moment.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
sleep(4);
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Welcome!" message:@"SAMPLE!!!" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
[alert show];
[alert release];
I'm new to app development so sorry if this is simple. Thanks in advance! :)
© Stack Overflow or respective owner