如何修复Xcode 10中的shouldAutorotate错误

时间:2019-05-12 20:54:45

标签: c++ xcode shouldautorotate

当我将游戏放入Xcode并将其上传到Appstore Connect时,我得到了 3-4错误,显示“实施不赞成使用的方法”,“使用未声明的标识符'interfaceOrientation'”和“方法'shouldAutorotate'的重复声明”

我搜索了各种方法来尝试解决问题,但没有一个具体的方法。

  • (BOOL)应该自动旋转{ PTModelGeneralSettingsPtr generalSettings = PTModelGeneralSettings :: shared(); if(generalSettings-> orientation()== PTModelGeneralSettings :: LandscapeOrientation){     返回UIInterfaceOrientationIsLandscape(interfaceOrientation); } 否则if(generalSettings-> orientation()== PTModelGeneralSettings :: PortraitOrientation){     返回UIInterfaceOrientationIsPortrait(interfaceOrientation); }

    返回否; }

  • (NSUInteger)支持的InterfaceOrientations { PTModelGeneralSettingsPtr generalSettings = PTModelGeneralSettings :: shared(); if(generalSettings-> orientation()== PTModelGeneralSettings :: LandscapeOrientation){     返回UIInterfaceOrientationMaskLandscape;

    } 否则if(generalSettings-> orientation()== PTModelGeneralSettings :: PortraitOrientation){     返回UIInterfaceOrientationMaskPortrait; }

    返回否; }

  • (BOOL)应该自动旋转{ 返回否; }

0 个答案:

没有答案
相关问题