iPad定位问题-一个定位或全部四个定位-可以';我不能只让两个人去工作

iPad定位问题-一个定位或全部四个定位-可以';我不能只让两个人去工作,ipad,orientation,autorotate,Ipad,Orientation,Autorotate,我有一个iPad应用程序,我绝对需要它只是在景观中,我知道建议中的情况,但对于这个应用程序,它需要是景观 现在我的问题来了 我已经编辑了我的.plist文件,以适当的方式支持横向左视图和横向右视图,并且在我的代码中加入了一个自动旋转片段,但是如果我有这个 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported

我有一个iPad应用程序,我绝对需要它只是在景观中,我知道建议中的情况,但对于这个应用程序,它需要是景观

现在我的问题来了

我已经编辑了我的.plist文件,以适当的方式支持横向左视图和横向右视图,并且在我的代码中加入了一个自动旋转片段,但是如果我有这个

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
/*if (autorotateOrientation && tapViewOrientation != interfaceOrientation && !insecureKeyboardWarningDialog) {
    tapViewOrientation = interfaceOrientation;
    [[NSUserDefaults standardUserDefaults] setInteger:tapViewOrientation forKey:kDefaultKeyTapViewOrientation];
*/
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);

[self prepareTapView];
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
/*if (autorotateOrientation && tapViewOrientation != interfaceOrientation && !insecureKeyboardWarningDialog) {
    tapViewOrientation = interfaceOrientation;
    [[NSUserDefaults standardUserDefaults] setInteger:tapViewOrientation forKey:kDefaultKeyTapViewOrientation];
*/
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft, UIInterfaceOrientationLandscapeRight);

[self prepareTapView];
//返回否; }

我只剩下风景了(显然)

如果我有这个

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
/*if (autorotateOrientation && tapViewOrientation != interfaceOrientation && !insecureKeyboardWarningDialog) {
    tapViewOrientation = interfaceOrientation;
    [[NSUserDefaults standardUserDefaults] setInteger:tapViewOrientation forKey:kDefaultKeyTapViewOrientation];
*/
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);

[self prepareTapView];
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
/*if (autorotateOrientation && tapViewOrientation != interfaceOrientation && !insecureKeyboardWarningDialog) {
    tapViewOrientation = interfaceOrientation;
    [[NSUserDefaults standardUserDefaults] setInteger:tapViewOrientation forKey:kDefaultKeyTapViewOrientation];
*/
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft, UIInterfaceOrientationLandscapeRight);

[self prepareTapView];
//返回否; }

我有四个方向。现在,我可以选择肖像方向,但说实话,这将是丑陋的和不起作用的,因此我只想在这个特殊的情况下为风景画工作


有谁能建议我做错了什么,以及如何将自己局限于风景画,而不是两种形式的风景画?

Genius。我知道这必须是非常简单的事情。非常感谢。
interface-orientation==ui-interface-orientation和scapeleft,ui-interface-orientation和scaperight
非常尴尬。它不会同时与
LandscapeLeft
LandscapeRight
进行比较,而是首先比较vs
LandscapeLeft
,然后只返回
LandscapeRight
的非零值,例如
YES
。别这样!
return UIInterfaceOrientationIsLandscape(interfaceOrientation);