ios - View Controller 之间的导航不起作用

标签 ios objective-c uinavigationcontroller

将 Controller 从一个屏幕移动到另一个屏幕时出现此类错误。

Presenting view controllers on detached view controllers is discouraged.

最佳答案

  [self.view.window.rootViewController presentViewController:viewController animated:YES completion:nil];

当一切都完成后,你可以调用:

 [self dismissViewControllerAnimated:YES completion:nil];

你也可以引用这个链接: Warning :-Presenting view controllers on detached view controllers is discouraged

关于ios - View Controller 之间的导航不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38581882/

相关文章:

ios - 如何在代码中选择Column系列Bar

ios - setNavigationBarHidden 不起作用

ios - 等到 popToRootViewControllerAnimated :YES animation is done

iphone - 我如何从 iphone 设备获取电子邮件历史记录..?

ios - 是否有比 Objective-C 中的委托(delegate)更简洁的方法来处理异步 http 请求?

ios - Xcode 7/swift 2.1 "Message from debugger: Terminated due to memory issue"

objective-c - 根据数字重组 NSDictionary 键

ios - 无法从选项卡栏 Controller 访问导航栏

iOS 9 Beta 5 - 日历隐私访问警报未显示在 iPhone 上,但显示在模拟器上

iphone - 在 uidatepicker 中将最大日期设置为当前日期