【发布时间】:2014-12-31 11:57:40
【问题描述】:
遗憾的是,我不得不从 UIActionSheet 迁移到 UIAlertController,因为 IOS8 删除了第一个功能。
在使用它之前,每次我进出主屏幕时,都会调用父视图“viewDidDisappear”,这样我就可以关闭我创建的菜单。
现在它不再被调用了。 代码如下:
UIAlertController *alert = [UIAlertController .... preferredStyle:UIAlertControllerSTyleActionSheet]
UIAlertAction* a = [....]
[alert addAction: a];
alert.popoverPresentationController.barButtonItem = self.myButton // the bar button from my view
[self presentViewController:alert animated:YES completion:nil] // maybe im not showing the view well?
我不知道如何从这里继续......希望得到一些帮助 谢谢。
== 编辑 ==
我看到不推荐使用的 UIActionSheet 和 UIDcoumentInteractionController 也会发生这种情况 - 仅在 IOS8 中,不在 IO7 中
【问题讨论】:
-
我也有同样的困惑。也许苹果开发者认为它是透明的,所以它并没有真正消失。
标签: objective-c xcode ios8