Tuesday, September 24, 2013

How to force a viewcontroller cross-screen display does?

posts by fisea on 2013-05-28 17:02:03 Edit
The layout is now:
A navigation controller, which has two tab item, I want to click on a tab item, then jump to a viewcontroller, I asked this viewcontroller cross-screen display. I tried it all else fails:

1 In the storyboard which set the Orientation of the viewcontroller Landscape. Interface immediately becomes horizontal screen. But the run up or vertical screen.
(2) To write a UINavigationController class overrides the following methods:
- (BOOL) shouldAutorotate
{
return YES;
}

- (NSUInteger) supportedInterfaceOrientations {
if ([[self topViewController] isKindOfClass: [CPDBarGraphViewController class]])
return UIInterfaceOrientationMaskPortrait;
else
return UIInterfaceOrientationMaskAllButUpsideDown;
}
But also failed. I iphone novices, experts advise. Thank you.
My environment is iOS 6.0
Reply:
http://bbs.csdn.net/topics/390392372

No comments:

Post a Comment