lna*_*ger 5 uiactionsheet ipad uisplitviewcontroller uipopovercontroller ios
我使用基于拆分视图的应用程序模板创建了一个新应用程序.
然后我将一个Action Button添加到名为actionButton的rootViewController导航控制器中.
按下按钮时,我会显示如下的ActionSheet:
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:nil
delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil
otherButtonTitles:@"Admin Functions", @"Refresh Data", nil];
[actionSheet showFromBarButtonItem:actionButton animated:YES];
[actionSheet release];
Run Code Online (Sandbox Code Playgroud)
在横向模式下按下按钮后,它会在指向按钮的弹出框中显示操作表(正如我预期的那样):

但是,在纵向模式下,它看起来完全不同,菜单从rootViewController popover的底部出现,就像在iPhone上一样:

我的问题是,如何在纵向模式下使ActionSheet显示在顶部,就像在横向模式下一样?
由于这是一个"实用程序菜单",它并不直接与显示的数据绑定,因此它不应该是弹出窗口的一部分.
| 归档时间: |
|
| 查看次数: |
1122 次 |
| 最近记录: |