Currently I am using the following code to present a UIAlertView:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@\"Today\'s Entry Complete\"
If you want to use blocks you can also use MKAdditions to achieve this easily even for multiple UIAlertViews.
Just use a code similar to this sample:
[[UIAlertView alertViewWithTitle:@"Test"
message:@"Hello World"
cancelButtonTitle:@"Dismiss"
otherButtonTitles:[NSArray arrayWithObjects:@"First", @"Second", nil]
onDismiss:^(int buttonIndex)
{
NSLog(@"%d", buttonIndex);
}
onCancel:^()
{
NSLog(@"Cancelled");
}
] show];
You can find more information in this tutorial: http://blog.mugunthkumar.com/coding/ios-code-block-based-uialertview-and-uiactionsheet