Action sheet doesn't show Cancel button on iPad

Posted by Padawan on Stack Overflow See other posts from Stack Overflow or by Padawan
Published on 2010-05-03T19:12:09Z Indexed on 2010/05/03 20:08 UTC
Read the original article Hit count: 827

Filed under:
|
|

On the iphone, this code shows the cancel button:

- (IBAction)buttonPressed
{
    UIActionSheet *actionSheet = [[UIActionSheet alloc]
                                  initWithTitle:@"Are you sure?"
                                  delegate:self 
                                  cancelButtonTitle:@"No way!"
                                  destructiveButtonTitle:@"Yes, I'm sure!"
                                  otherButtonTitles:nil];
    [actionSheet showInView:self.view];
    [actionSheet release];  
}

But on the iPad, only the destructive button shows.
What's the problem?

© Stack Overflow or respective owner

Related posts about ipad

Related posts about uiactionsheet