Here is the code to creating a UIAlertView Programmatically:


Code:
UIAlertView *myAlert = [[[UIAlertView alloc] initWithTitle:@"Sample Title" message:@"Sample Massage" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil] autorelease];
		[myAlert show];