【发布时间】:2012-02-10 00:25:05
【问题描述】:
我有一个 UIBarButtonItem 提供的 UIPopoverController。我有另一个 UIBarButtonItem,它是一个主页按钮,按下时,
[self.navigationController popToRootViewControllerAnimated:YES];
问题是,我的弹出框仍然可见,然后当我 popToRootViewController 时我得到一个 SIGABRT,因为在我的 dealloc 方法中,我释放了弹出框上的内存。弹出框也保持可见。错误是
Terminating app due to uncaught exception 'NSGenericException', reason: '-[UIPopoverController dealloc] reached while popover is still visible.'
我不明白的是,我认为默认操作是在您单击屏幕上的其他位置时关闭弹出框。我该如何处理这个用例?谢谢。
【问题讨论】:
标签: iphone uipopovercontroller