0

How show a alertview just when the app open, load...

Like everytime that the user open the app, he see the alert ....

Rafael
  • 1
  • 1

3 Answers3

1

write the alert statment in the following appDelegate method,

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
      UIAlertView *alert_View = [[[UIAlertView alloc] initWithTitle:@"Your Title" message:@"Your Message" delegate:self cancelButtonTitle:nil otherButtonTitles:@"YES",@"NO",nil] autorelease];
    [alert_View show];
}
0

Show the alertview in the application delegate class, in applicationDidFinishLaunching: and in applicationWillEnterForeground:

YPK
  • 1,851
  • 18
  • 18
0

@Rafeel put this UIAlertView in your didFinishLaunchingWithOptions method of your AppDelegate and you will always get the UIAlertView when your app launches

UIAlertView *confirmAlertView=[[UIAlertView alloc]initWithTitle:@"Saved" message:@"Want to save!!" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Cancel",nil];
    [confirmAlertView show];
    [confirmAlertView release];

Hope it Will Help u!

Sudhanshu
  • 3,950
  • 1
  • 19
  • 18