我有一个呈现(模态)的视图控制器,需要呈现一个操作表。然而,当我这样做时:
UIAlertController *actionSheet = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
...
[self presentViewController:actionSheet animated:YES completion:nil];
I get this:
Warning: Attempt to present <UIAlertController: 0x7fed4a608120> on <MyViewController: 0x7fed4d1ca520> which is already presenting (null)
这里有没有解决方法?从一个已经展示的视图控制器中使用警告框或操作表似乎是一个相当常见的场景。