[FIXED] iOS 6.0 Orientation Issues

In iOS 6.0 shouldAutorotateToInterfaceOrientation is deprecated and never gets called. Can be reproduced the simulator.

More info and possible fixes: http://stackoverflow.com/questions/12260261/shouldautorotatetointerfaceorientation-not-being-called-in-ios-6

This means that UIViewComponentPeer::displayRotated() never gets called in JUCE and the display is not rotated correctly.

For now I have just added a hotfix to JuceUIViewController. Hopefully this will get fixed in the repository soon :slight_smile:

[code]- (BOOL)shouldAutorotate
{
JuceUIView* juceView = (JuceUIView*) [self view];
jassert (juceView != nil && juceView->owner != nullptr);
juceView->owner->displayRotated();
[UIView setAnimationsEnabled: YES];

return YES;

}[/code]

I thought in addition to the call above the following is also needed:

-(NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskAll; }

I’ve already added that.

Thanks for the fast fix!