Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIWindow endDisablingInterfaceAutorotationAnimated: error

I'm receiving the following error when a user is in MFMailComposerViewController and presses the Home button:

[UIWindow endDisablingInterfaceAutorotationAnimated:] called on > without matching -beginDisablingInterfaceAutorotation. Ignoring.

I have looked around the forums and some other people have experienced this error in different circumstances, but there is no solution.

I have set shouldAutorotate to this in all the View Controllers in the app:

- (BOOL)shouldAutorotateToInterfaceOrientation:
                                  (UIInterfaceOrientation)interfaceOrientation
{
    return interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown ||
           interfaceOrientation == UIInterfaceOrientationPortrait;
}
like image 581
Maddy Avatar asked Sep 14 '12 05:09

Maddy


1 Answers

Check if you have redundant calls to dismiss keyboard, UIActionSheet and etc.

I had the same problem and solved by changing my way to dismiss the keyboard. I found this below post to be the most helpful one

Unknown error [UIWindow endDisablingInterfaceAutorotation]

like image 51
laeroah Avatar answered Nov 05 '22 18:11

laeroah