I am receiving 2 errors while a dismissal is happening in my app. <br />
`Warning: Attempt to dismiss from view controller <MyNavigationController> while a presentation or dismiss is in progress!` <br />
& <br />
`Unbalanced calls to begin/end appearance transitions for <MainViewController>.`

I've searched around and everywhere says that there is usually a conflicting dismissal happening where a button is calling the transition both programmatically and through the storyboard. I, however, am receiving these errors when using the normal back button that comes with nav controllers. I don't do anything with the button at all.

The only thing I can link to the errors is that my nav controller is autorotating while trying to dismiss the view controller. If I remove autorotate or set the orientation of both view controllers to be the same then I don't get the error. Problem is, I need one of the view controllers to be portrait and the other to be landscape...

This is how I set the orientation

NavController.m:

 - (NSUInteger)supportedInterfaceOrientations {
 return self.topViewController.supportedInterfaceOrientations;
 }
 
 - (BOOL)shouldAutorotate {
 return YES;
 }

MainViewController.m:

 - (NSUInteger)supportedInterfaceOrientations {
 return UIInterfaceOrientationMaskPortrait;
 }

OtherViewController.m:

 - (NSUInteger)supportedInterfaceOrientations {
 return UIInterfaceOrientationMaskLandscapeRight;
 }

I've noticed that for some reason it doesn't autorotate when going to my "OtherViewController", but it apparently tries to autorotate while returning to the "MainViewController", thus causing the crash.