Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mekopolis

macrumors regular
Original poster
Feb 10, 2008
152
0
quick question

how do you set it so the view loads up in landscape orientation and stays in that mode?

Code:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
	// Return YES for supported orientations
	return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}


thanks
 

fenrus110

macrumors regular
Mar 24, 2008
142
0
Code:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
	// Return YES for supported orientations
	// return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
return YES;
}

You have to do more work than that though to make it really work properly. I'm having some difficulties with it. It gets nasty if you are using a UINavigationController in your program.
 

mekopolis

macrumors regular
Original poster
Feb 10, 2008
152
0
i played around with it
and this worked the best for me somehow

hopes this helps someone

Code:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
	// Return YES for supported orientations
	if( interfaceOrientation == UIInterfaceOrientationLandscapeRight ||
	   interfaceOrientation == UIInterfaceOrientationLandscapeLeft ) {
		return YES;
	}
	return NO;
}
 

fenrus110

macrumors regular
Mar 24, 2008
142
0
Here's a mind boggler. Let's say you have navigating through a table view in portrait mode, you when you go into the next screen, you want to look at the detail screen in landscape only.

Can you do that?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.