我使用分割视图应用程序模板创建了一个新的应用程序。
然后,我向rootViewController导航控制器添加了一个名为actionButton的操作按钮。
当按下按钮时,我会显示一个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];
在横屏模式下,当我按下按钮后,它以期望的方式在弹出窗口中显示操作表,指向按钮(正如我所预期的):
![Landscape Mode](https://istack.dev59.com/agFzL.webp)
![Portrait Mode](https://istack.dev59.com/lkFBI.webp)
由于这是一个“实用菜单”,它与正在显示的数据没有直接关系,因此不应该成为popover的一部分。