Tuesday, April 19, 2011

How to Create UIAlertViews

In the header file (***ViewController.h)

-(IBAction)pushAlert;

In the (***ViewController.m)

-(IBAction)pushAlert {

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@”This is a alert view” message:@”Hi my name is bob. I like to code random projects for the iPhone” delegate:nil cancelButtonTitle:@”Cancel” otherButtonTitles:nil];
[alert show];
[alert release];
}




No comments:

Post a Comment