7

I am receiving this error. I have no clue as to why it would be called, and Google didn't really help. Any suggestions?

-[UIWindow endDisablingInterfaceAutorotation] called on <UIWindow: 0x4e0ec50; frame = (0 0; 320 480); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x4e0f9e0>> without matching -beginDisablingInterfaceAutorotation. Ignoring.
Pang
  • 9,564
  • 146
  • 81
  • 122
iAm
  • 219
  • 3
  • 5
  • 12

5 Answers5

8

I recently had the same problem. It turned out that I was accidentally displaying the same UIActionSheet twice. eg.

[actionSheet showInView:aView];

... more code ...

// WOOPS! I already did this
[actionSheet showInView:aView];

When the UIActionSheet gets dismissed (for about the 12th time, probably the -beginDisablingInterfaceAutorotation stack depth) it caused the error. Removing the redundant call to -showInView: fixed the problem.

hyperspasm
  • 1,243
  • 1
  • 16
  • 27
  • 2
    I had same problem with a smiler cause, I was animating a UICollectionViewCell and it was reloading 1/2 way through. – BooRanger Feb 10 '15 at 17:44
6

I've had a similar issue when performing a custom UIViewController presentation using a UIViewControllerAnimatedTransitioning class. For me, the printouts looked like the following:

-[UIApplication endIgnoringInteractionEvents] called without matching -beginIgnoringInteractionEvents. Ignoring.
-[UIWindow endDisablingInterfaceAutorotationAnimated:] called on <UIWindow: 0x7f9f83f42db0; frame = (0 0; 375 667); autoresize = W+H; gestureRecognizers = <NSArray: 0x7f9f83f44ed0>; layer = <UIWindowLayer: 0x7f9f83f40ca0>> without matching -beginDisablingInterfaceAutorotation. Ignoring.
-[UIWindow endDisablingInterfaceAutorotationAnimated:] called on <UITextEffectsWindow: 0x7f9f862553a0; frame = (0 0; 375 667); opaque = NO; autoresize = W+H; layer = <UIWindowLayer: 0x7f9f83f9a1e0>> without matching -beginDisablingInterfaceAutorotation. Ignoring.

I found out that the error was caused by calling transitionContext.completeTransition(true) twice (once in animateTransition(_:), and another in a CAAnimation delegate animationDidStop(_:flag:) method). You might want to check that you aren't doing something similar.

Ziewvater
  • 1,413
  • 1
  • 18
  • 33
3

Adding UIViewAnimationOptionLayoutSubviews into the animation options solved my problem.

Sukwon
  • 239
  • 2
  • 8
-1

I ran into a similar issue for no reason. Nothing had changed in my build. All I had to do was remove my application from my testing device, rebuild and redeploy and this issue was solved. Worth a shot!

AndrewSmiley
  • 1,933
  • 20
  • 32
-6

Looks like you have to call -beginDisablingInterfaceAutorotation first and you're not doing that.

Thomas Müller
  • 15,565
  • 6
  • 41
  • 47
  • I did not call this method to begin with, I have already read that the beginMethod needs to be called first, but that is only when you call the end one and I did not, I did however track down the piece of code that caused it, [self showPurchase:purchase animated:YES]; the animated needs to be set to NO. The thing is, when i first wrote this it did not throw an error, until I changed some code in the tableView methods, i needed to use a switch statement because of multiple sections, before there was only 1 section, i am still investigating. – iAm Mar 03 '10 at 23:19