Show alert/popup message

Problem: you want to show an alert/popup with a message.

Solution: you want to use the UIAlertView class. Example below:

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"This is a title"
  message:@"Hello world!" delegate:self 
  cancelButtonTitle:@"Cancel" otherButtonTitles:@"Button #1", @"Button #2", nil];
[alert show];
[alert release];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"This is a title"
  message:@"Hello world!" delegate:self 
  cancelButtonTitle:@"Cancel" otherButtonTitles:@"Button #1", @"Button #2", nil];
[alert show];
[alert release];

Your delegate should implement the UIAlertViewDelegate protocol.

Komentowanie jest zakończone.