ios Presenting view controllers on detached view controllers is discouraged <BasicInfoVC: 0x7fb2d

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ios Presenting view controllers on detached view controllers is discouraged <BasicInfoVC: 0x7fb2d相关的知识,希望对你有一定的参考价值。

出现的原因:

  在控制器A中添加控制器B--[A.view addSubView: B.view]

  在控制器B中弹出新的控制器时报此waring

解决:

[A addChildViewController:B];

[B.parentViewController presentViewController:alertController animated:YES completion:nil];

 

详见:http://stackoverflow.com/questions/19890761/warning-presenting-view-controllers-on-detached-view-controllers-is-discourage

以上是关于ios Presenting view controllers on detached view controllers is discouraged <BasicInfoVC: 0x7fb2d的主要内容,如果未能解决你的问题,请参考以下文章

iOS Storyboard Presenting Segues "relationship, embed, push, modal, custom" 类型

来自 UITableView 的 Swift Presenting popover 运行速度非常慢

如何在iOS 7中显示排行榜

所有视图的 SwiftUI 视图,包括工作表视图

Qt ModelView模式

MVC介绍