0

My application is handling every orientation in the runtime, but I cannot determine initial orientation correctly on iOS 5.1 which messes up my custom animated splashScreen, so what I came up is forcing initial orientation on iOS 5.1 to portrait. The problem is - when I set it up in info.plist, all iOS's get this. (i'm also supporting iOS 6)

Maybe there is some hidden feature for checking initial orientation. But so far I've tried statusBar (returning portrait), device orientation (problem, when device is lying flat), or delaying splash - but this gives me even more headache.

How can I force inititial orientation only on iOS 5.1?

patrykens
  • 159
  • 1
  • 6

1 Answers1

0

You can check the iOS version using

[[UIDevice currentDevice] systemVersion]

Then

UIViewController *c = [[UIViewController alloc]init];
[self presentModalViewController:c animated:NO];
[self dismissModalViewControllerAnimated:NO];
[c release];

(for more details see here).

Community
  • 1
  • 1
Pat Lillis
  • 1,152
  • 8
  • 19
  • This doesn't apply for me. I have to know UIInterfaceOrientation when Default.png is showing, because my splashScreen animates Default.png. I'm supporting Default.png's for both orientations, so It's a bit different. – patrykens Jul 02 '13 at 13:06