Indy
Indy

Reputation: 191

Re-enable landscape orientation in Xcode 4

I temporarily disabled landscape orientations in my iPhone app while I fixed a problem with an image. Now, for the life of me, I can't get any pages to AutoRotate to either landscape orientation. It worked fine previously. I have all 4 orientations identified in the UISupportedInterfaceOrientations in the info.plist. All 4 orientations are highlighted in the Targets Summary Supported Device Orientations. My implementation files all have:

-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {    
    return YES;
}

I'm sure it's something stupid I'm missing, but I can't find it after trying for hours. Any thoughts????

Upvotes: 0

Views: 2256

Answers (2)

PengOne
PengOne

Reputation: 48398

If you are certain that each viewController has

    -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { 
           return YES; 
    }

then you may want to try deleting the Build/ directory, selecting clean all targets in the build options, and then relaunching the app. Sometimes this miraculously works. Also, closing and re-opening the simulator and/or Xcode is a common mystery solution for me.

If this doesn't work, then you may want to read through Apple's trouble shooting guide: Why won't my UIViewController rotate with the device?

Upvotes: 3

Joshua Nozzi
Joshua Nozzi

Reputation: 61228

You may want to clean all targets - the updated plist may not be getting copied into the app bundle. If this is on the device, you may try deleting the app from the device as well.

Upvotes: 0

Related Questions