在 iPhone 上,这段代码会显示取消按钮:
- (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];
}
但在iPad上,只有破坏性按钮显示。
问题是什么?
[sheet showInView:popOverController.view]
- Alex Wayne