Currently I am using the following code to present a UIAlertView:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@\"Today\'s Entry Complete\"
You need to set the delegate when allocating the alertview, then use one of the UIAlertViewDelegate methods to call your own method, for example:
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Today's Entry Complete"
message:@"Press OK to submit your data!"
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alert show];
[alert release];
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
[self submitData];
}