【发布时间】:2012-01-23 21:15:14
【问题描述】:
我正在使用 XCode 4.2(带有情节提要)
我正在尝试仅旋转其中一个视图(而不是所有视图),但它似乎不起作用......要么没有视图旋转,要么全部旋转
我已经检查了摘要中所有支持的视图,并且在信息中我确保应用程序“支持的界面方向”都在那里
在与视图相关的类中,我编写了旋转该特定视图的函数:
-(BOOL) shouldAutoRotateToInterfactOrientation:(UIInterfaceOrientation)interfaceOrientation{
return(interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown||
interfaceOrientation != UIInterfaceOrientationPortrait||
interfaceOrientation != UIInterfaceOrientationLandscapeRight||
interfaceOrientation != UIInterfaceOrientationLandscapeLeft)
}
当我旋转屏幕时它仍然不旋转......有什么线索吗?
【问题讨论】:
-
你确定那些“不相等”的运算符吗?你不应该使用“==”还是直接返回YES?
-
我尝试了“是”并尝试了 ==... 没有工作
标签: iphone objective-c ios xcode4.2 storyboard