0

I need a way to do the above. I've tried putting

-(BOOL) shouldAutorotate {
    return NO;
}

into every one of my viewcontrollers, but it still autorotates when I tilt the device on its side.

Why do I need this? One of our partners has an SDK which requires us to support the other orientations (or else their app crashes).

So what can I do to lock our portrait mode in place and keep it like that?

Mark S
  • 2,161
  • 3
  • 21
  • 25

2 Answers2

0

Not possible. In iOS "supporting" a device orientation implies that when the screen rotates to one of the other orientations (not portrait) your application re-sizes and lays out for that orientation. If you want to remain locked in portrait mode DO NOT support anything other than portrait.

Cliff Ribaudo
  • 8,932
  • 2
  • 55
  • 78
  • This is not what I wanted to hear, but I'm glad you told me before I went any further. If I dont' get any other hopeful replies soon, I'll mark your's as the answer. – Mark S Nov 06 '12 at 22:36
  • If their Lib is crashing Apps not supporting other orientations, THEY have a bug which THEY should fix. And fixing it does NOT constitute asking other people to support other orientations. Are the using a TabController? – Cliff Ribaudo Nov 06 '12 at 22:38
0

I used a category to extend and override the UITabBarController, forcing autorotation off.

Check out this SO: UITabBarController Rotation Issues in ios 6

Community
  • 1
  • 1
Mark S
  • 2,161
  • 3
  • 21
  • 25