Add three buttons to a UIAlertView

advertisements

I created uialertview, and add two buttons, Now I need to add one more button in alert view. How to edit my code to add one more button?

UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Refresh" message:@"Are you want to Refresh Data" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];
[alert show];
[alert release];


If you are really struggling to find the solution, the following code may help you.

UIAlertView *alert = [[UIAlertView alloc]
                        initWithTitle:@"Refresh"
                              message:@"Are you want to Refresh Data"
                             delegate:self
                    cancelButtonTitle:@"Cancel"
                    otherButtonTitles:@"OK", @"Done", nil];
[alert show];
[alert release];