在iOS 7 Storyboard中禁用模态会导致警告



我在iOS 7的设计中使用了一个故事板,当我关闭一个模态时,我收到了以下警告:

Warning: Attempt to dismiss from view controller <UITabBarController: 0x8e11120> while a presentation or dismiss is in progress!

模态被忽略了,但我不喜欢这个警告。我用以下内容驳回了呈现视图控制器中的模态:

- (IBAction)doneButtonPressed:(UIStoryboardSegue *)segue{
   [self.presentedViewController dismissViewControllerAnimated:YES completion:nil];}

我也用segue.sourceViewController进行了尝试,得到了相同的结果。

有什么想法吗?

找到了答案。。。当您展开时,不需要显式地关闭模态控制器。这来自于放松的自由。

最新更新