UIInterfaceOrientationLandscapeLeft和UIInterfaceOrientationLandscapeRight是否相反?

Jak*_*čar 5 iphone cocoa-touch uikit

文件说:

UIInterfaceOrientationLandscapeLeft

设备处于横向模式,设备直立,主页按钮位于右侧.

UIInterfaceOrientationLandscapeRight

设备处于横向模式,设备直立,主页按钮位于左侧.

但是,我让他们完全颠倒了.SDK中真的会出现这样的错误,还是我只是疯了?

码:

+ (NSString *)NSStringFromUIInterfaceOrientation:(UIInterfaceOrientation)o
{
    switch (o) {
        case UIInterfaceOrientationPortrait: return @"UIInterfaceOrientationPortrait";
        case UIInterfaceOrientationPortraitUpsideDown: return @"UIInterfaceOrientationPortraitUpsideDown";
        case UIInterfaceOrientationLandscapeLeft: return @"UIInterfaceOrientationLandscapeLeft";
        case UIInterfaceOrientationLandscapeRight: return @"UIInterfaceOrientationLandscapeRight";
    }
    return nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation
{
    NSLog(@"Should: %@", [[self class] NSStringFromUIInterfaceOrientation:toInterfaceOrientation]);
    return YES;
}    
Run Code Online (Sandbox Code Playgroud)

我将上面的代码粘贴到默认的基于导航的应用程序模板的RootViewController.m中.

后续行动:报告为错误7216046.

Tim*_*Tim 1

您确定您正确阅读了文档吗?请注意,主页按钮位置和方向值是相反的- 即,UIInterfaceOrientationLandscapeLeft意味着主页按钮位于右侧,并且UIInterfaceOrientationLandscapeRight意味着主页按钮位于左侧。确保旋转设备以进行正确检查。

编辑:我已经确认了原始问题中提出的问题。看起来像一个错误,除非我也错过了一些东西。