我想使用 UIActionSheet 允许用户选择我的 iphone 应用程序的两种模式之一。所以我不需要显示取消按钮。我只是想问他是否要选择模式一或二。我试图不添加它,但它不允许我,我该怎么做?
注意:我不想使用警报。
我使用此代码添加 UIActionSheet:
UIActionSheet *mySheet = [[UIActionSheet alloc] initWithTitle:@"choose one" delegate:nil cancelButtonTitle:@"tasks" destructiveButtonTitle:@"appointments" otherButtonTitles:nil];
[mySheet showInView:self.view];