iOS,presentViewController导致出现奇怪/慢速视图

时间:2017-09-05 13:41:20

标签: ios objective-c uiviewcontroller

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
UIViewController *view = [storyboard instantiateViewControllerWithIdentifier:@"LoginForm"];
[self presentViewController:view animated:NO completion:nil];

我也试图使用以下方法但没有成功:

[[[[UIApplication sharedApplication] keyWindow] rootViewController] presentViewController:view animated:NO completion:nil];

2017-09-05 14:36:20.490765+0100 dev.phonedivert[393:54771] Warning: Attempt to present <LoginScreen: 0x151e39ff0> on <ViewController: 0x151e0aae0> whose view is not in the window hierarchy!

无论显示登录视图控制器的方法如何,我都可以在视图控制器中看到此延迟/滞后。一半的UI元素显示,但其余的显示在日志返回后出现以下错误:

2017-09-05 14:36:31.031448+0100 dev.phonedivert[393:54773] This application is modifying the autolayout engine from a background thread after the engine was accessed from the main thread. This can lead to engine corruption and weird crashes

我不确定我是否在某处设置了自动调整大小选项,我已经禁用了任何我可以通过storyboard编辑器找到的内容。

进一步调查:

2017-09-05 13:38:12.137226+0100 dev.phonedivert[8770:1420704] [LayoutConstraints] Unable to simultaneously satisfy constraints.

约束是最糟糕的,即使它们都是蓝色的,它们仍然是错的?

0 个答案:

没有答案