Friday, March 22, 2013

How to display a message/popup

  1. Write the following code in the ViewController.m file:

        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Title Here" message:@"This is the message" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
        [alert show];
  2. Run the code, it should display like:

No comments:

Post a Comment