我无法正确解除presentViewController,它正在创建一些约束 - 自动布局错误。我尝试搜索此问题,但没有一个解决方案解决了这个问题。这是描述..
我有一个FirstViewController和一个SecondViewController。
从FirstViewController我执行以下操作:
SecondViewController *secondView = [story instantiateViewControllerWithIdentifier:@"secondView"];
UINavigationController *navigationController =
[[UINavigationController alloc] initWithRootViewController:secondView];
[self.navigationController presentViewController:navigationController animated:YES completion:nil];
现在在SecondViewController中我有一个moveBack函数,它应该回到FirstViewController:
-(void)moveBack{
[self dismissViewControllerAnimated:YES completion:nil];
}
按下后退按钮即可启动此moveBack。但是当我这样做时,xcode给了我一些自动布局约束错误。具体错误是:
Probably at least one of the constraints in the following list is one you don't want.
任何帮助将不胜感激。谢谢!