0

I have a view controller with an UIButton. That view controller is shown in landscape right mode only. Until iOS 8.0.2, all works fine. I'm testing with an iPhone 5S.

But after installing iOS 8.1.1, the following happens:

  1. If I click the button just right after the view controller is shown, all works fine. The touch up inside event is received.
  2. But if I start to rotate the phone a few times, even when the view does not change orientation (remember, landscape right only), the events are not received anymore.

Here is the relevant code:

-(BOOL)shouldAutorotate
{
    NSLog(@"shouldAutorotate");
    return NO;
}

- (NSUInteger)supportedInterfaceOrientations
{
    NSLog(@"supportedInterfaceOrientations");
    return UIInterfaceOrientationMaskLandscapeRight;
}

I should mention that the method shouldAutorotate is called several times.

Thank you in advance. Any help would be appreciated.

neutrino
  • 2,297
  • 4
  • 20
  • 28
  • The debug path ***I*** would take here is : Check button `userInteractionEnabled`-> Check button `enabled` -> check view bounds (try setting a border color and width, or setting `masksToBounds`).....It might be because your view is not getting resized correctly. – n00bProgrammer Nov 25 '14 at 12:59
  • @n00bProgrammer Thank you for your comment. Those things have been done with no further insight into the problem. The border shows the correct size & position, the user interaction is enabled, and the button itself is enabled also. – neutrino Nov 25 '14 at 14:32

1 Answers1

0

If you use only one landscape right mode, try to detect device orientation like here:

Detecting iOS UIDevice orientation

Community
  • 1
  • 1
iOSfleer
  • 408
  • 6
  • 20