Objective c 第4.5.4单元ios 8中的Xcode项目横向模式屏幕定向

Objective c 第4.5.4单元ios 8中的Xcode项目横向模式屏幕定向,objective-c,xcode,unity3d,ios8,Objective C,Xcode,Unity3d,Ios8,任何帮助, 谢谢 我在Unity 4.5.4 Xcode项目中面临一个问题 如何在ios 8中锁定横向模式屏幕方向?屏幕方向转换到单位屏幕方向(UIInterfaceOrientation HWRORient,EnabledOrientation*outAutorotOrient){ ScreenOrientation ConvertToUnityScreenOrientation(UIInterfaceOrientation hwOrient,EnabledOrientation* outAu

任何帮助, 谢谢

我在Unity 4.5.4 Xcode项目中面临一个问题

如何在ios 8中锁定横向模式屏幕方向?

屏幕方向转换到单位屏幕方向(UIInterfaceOrientation HWRORient,EnabledOrientation*outAutorotOrient){
ScreenOrientation ConvertToUnityScreenOrientation(UIInterfaceOrientation hwOrient,EnabledOrientation* outAutorotOrient){
    EnabledOrientation autorotOrient     = autorotPortrait;
    ScreenOrientation  unityScreenOrient = portrait;
    switch (hwOrient)
    {   case UIInterfaceOrientationPortrait:
            autorotOrient     = autorotPortrait;
            unityScreenOrient = portrait;
            break;
        case UIInterfaceOrientationPortraitUpsideDown:
            autorotOrient     = autorotPortraitUpsideDown;
            unityScreenOrient = portraitUpsideDown;
            break;
        case UIInterfaceOrientationLandscapeLeft:
            autorotOrient     = autorotLandscapeRight;
            unityScreenOrient = landscapeRight;
            break;
        case UIInterfaceOrientationLandscapeRight:
            autorotOrient     = autorotLandscapeLeft;
            unityScreenOrient = landscapeLeft;
            break;
    }
   if (outAutorotOrient)
        *outAutorotOrient = autorotOrient;

    return portrait; // Now works in Landscape >.<
}
EnabledOrentation AutoRotorClient=自动拍摄肖像; 屏幕方向unityScreenOrient=纵向; 开关(HW方向) {案例UIInterfaceOrientationGraphital: autorotOrient=自动拍摄肖像; unityScreenOrient=肖像; 打破 案例UIInterfaceOrientation肖像向上向下: AutoRotorClient=自动上下旋转; unityScreenOrient=正面朝下的肖像; 打破 案例UIInterfaceOrientation和scapeLeft: AutoRotoClient=autorotLandscapeRight; unityScreenOrient=景观权; 打破 案例UIInterfaceOrientation和scapeRight: AutoRotorClient=AutoRotLandscape Left; unityScreenOrient=景观左侧; 打破 } if(自动输出) *outAutorotOrient=自动回复者; return grait;//现在可以在横向>中使用< }
谢谢,兄弟,我可以解决这个问题。我们可以使用这个方法,我无法格式化这个答案。对不起