I am unable to dismiss a presentViewController properly, it is creating some constraint - autolayout errors. I tried searching for this issue, but none of the solutions resolved the problem. Here's the description..
I have a FirstViewController and a SecondViewController.
From FirstViewController I do the following :
SecondViewController *secondView = [story instantiateViewControllerWithIdentifier:@"secondView"];
UINavigationController *navigationController =
[[UINavigationController alloc] initWithRootViewController:secondView];
[self.navigationController presentViewController:navigationController animated:YES completion:nil];
Now in SecondViewController I have a moveBack function which should move back to FirstViewController:
[self dismissViewControllerAnimated:YES completion:nil];
This moveBack is initiated on pressing a back button. But when I do it xcode gives me some autolayout constraint errors. The specific error is :
Probably at least one of the constraints in the following list is one you don't want.
Any help would be appreciated. Thanks!