出现的原因:
在控制器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
时间: 2024-10-12 20:23:13