Quote:
Originally Posted by HoofSC
I have tried the last suggestion, but still didn't find pleasing results.
Has anyone had any luck with this?
I too would like the mainViewController to display ONLY a landscape orientation and the flipSideViewController to display ONLY a portrait orientation.
Is this possible? Thx in advance...
|
yup! sure is!! I was just playing around myself to make this work. this might not be the best way to do this but what I have done is set an enum value to indicate weather we are working in landscape or portrait and then implement the following:
Code:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
switch (m_LayoutSetting) {
case LayoutSettingPortrait:
return (interfaceOrientation == UIInterfaceOrientationPortrait);
break;
case LayoutSettingLandscape:
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
break;
}
}
All you have to do when switching views is set the enum for your view controller, and call the rotate function as mentioned above.
as well: (from
http://www.dejoware.com/blogpages/blog.html)
"I’ve discovered that the setOrientation message for UIDevice is only needed to get the iPhone Simulator to start with the desired orientation. It can be left out if you are testing on a device and/or for your “final” build, if you want to avoid even this one warning."
hope this helps.