【发布时间】:2011-07-20 18:54:58
【问题描述】:
我在 iPad 的 modalView 中使用 ActionSheet。 我从导航控制器上的 UIBarButton 显示它。 第一个问题:如果我点击 10 次,它会显示 10 个 actionSheet,这是一个问题。
第二个问题:在导航栏的右边,有一个完成按钮。 当我点击 actionSheet 按钮,出现 actionsheet,然后我点击 DONE 按钮,modalView 被关闭,actionsheet 保持在屏幕上,然后应用程序崩溃。
显示操作表的代码:
UIActionSheet *iPadActionButton = [[UIActionSheet alloc] initWithTitle: @""
delegate: self
cancelButtonTitle: nil
destructiveButtonTitle: nil
otherButtonTitles: @"option 1", @"option 2", @"option ", nil];
iPadActionButton.destructiveButtonIndex = 2;
[iPadActionButton showFromBarButtonItem:self.navigationItem.rightBarButtonItem animated:YES];
[iPadActionButton setTag:200];
[iPadActionButton release];
关于如何解决这些问题的任何想法?
瑞
【问题讨论】:
标签: iphone ipad uiview modal-dialog uiactionsheet