我的整个界面都在一个 Storyboard 中.我怎样才能使大多数 ViewController 只支持纵向,而只有一对支持所有方向.我无法理解苹果新的自动旋转系统.另外,我怎样才能使它向后兼容 iOS 5?
I have my entire interface in one Storyboard. How can I make most of the ViewControllers only support a portrait orientation while only a couple supporting all orientations. I can't understand apples new auto rotate system. Also, how can I make this backwards compatable to iOS 5?
在您的 Navigation Controller 子类中,将决策转发到堆栈中的顶部视图控制器:
In your Navigation Controller subclass, forward the decision to the top view controller in the stack:
-(NSUInteger) supportedInterfaceOrientations {
return [self.topViewController supportedInterfaceOrientations];
}
为此创建一个单独的故事板文件是最糟糕的做法,让它们与您的应用更新保持同步将是一场维护噩梦.
Creating a separate storyboard file for this is the worst path to follow, it'll be a maintenance nightmare to keep them in sync with your app updates.
这篇关于iOS 6 自动旋转混乱的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!