views:

651

answers:

1

I have two apps, both of which force the user to use the iPhone in landscape mode, in order to have a wider screen, instead of a taller one. I selected UIInterfaceOrientationLandscapeRight in my plist file as I prefer to hold the iPhone with my right thumb over the iPhone button. Some users would like to have the app start-up in UIInterfaceOrientationLandscapeLeft since they prefer holding it the other way.

Given that the value is stored in my plist file, I don't suppose there is anyway I can save the user's preference for this setting, and use it at launch time for especially for the display of Default.png.

I thought I would ask anyway and see if anyone here has found a way to save the user's screen orientation preference and bring up the app in that orientation. Mind you, the biggest challenge is Default.png, which is what gives the user the first clue as to which direction the orientation will be. I can switch to their last orientation after that, but by then the Default.png graphic will have forced the user to turn the iPhone in the indicated direction.

A: 

set up a check and use: -(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return (interfaceOrientation == UIInterfaceOrientationLandscapeRight); }

Matt S.
The info.plist contains UIInterfaceOrientationLandscapeRight which forces the iPhone into that landscape mode at launch time. I am asking how to save the user's preference for right or left and use that to display Default.png in the either landscape mode.
mahboudz
create two images, one left, one right. Then when the user starts the app use -(void)awakeFromNib and display the image that way (have it do a timer so it's displayed for x seconds) Yes your not using the info.plist, but that's the only way I can think of to do it.
Matt S.