1

I've an iPad app that supports all orientation... my problem was on the start up of the application. In case of landScapeRight and landScapeLeft and portrait(top home button) the views shows correctly but when the app start in portrait (bottom home button) the views show in landscape mode... I've implemented the

- (void) willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

When I change the apps orientation the views shows correctly.

edie
  • 758
  • 1
  • 11
  • 29
  • I don't know the answer, but I'm thinking that perhaps the os assumes that portrait with the button at the bottom is the default view and therefore doesn't query the app or rotate it. Does the app have a "default" view as such? – drekka Jun 17 '10 at 03:40

1 Answers1

0

I've run into this problem as well. After digging around https://devforums.apple.com it appears this may be a bug. There is a work-around that someone recommended and that worked for me.

Step 1. In XCode4 (or via the Info.plist file) limit the supported orientations to just UIInterfaceOrientationLandscapeLeft, UIInterfaceOrientationLandscapeRight

Step 2. Still return YES for all interface orientations via:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

This will have the result of starting your app in landscape mode, but allowing the user to rotate it to any mode they want while its running. This will correct the rendering issue you have.


A similar question/answer can be found here: Landscape Mode ONLY for iPhone or iPad

Community
  • 1
  • 1
Matt
  • 693
  • 9
  • 16