2017-04-03 89 views
0

我有一个反应原生应用程序,将部署到tvOS。目前,我正在苹果的Simulator的帮助下建设。在模拟器中为tvOS应用程序旋转显示

它被锁定在横向模式下,将被部署到的电视机处于纵向模式。

虽然我不能将模拟器旋转到肖像模式,但我被卡住了。我花了一个小时左右的时间搜索,我找不到如何旋转我的tvOS应用程序的答案。该选项在Hardware > Rotate Left中,但显示为灰色。

tvOS rotate greyed out

如何旋转我tvOS应用90度?

+0

我真的希望有答案。我不想整个应用程序横向... –

回答

1

至少到目前为止,与tvOS 10.2。 AppleTv只支持横向导航。

正如你所看到的,UIDeviceOrientation的定义被标记为__TVOS_PROHIBITED

typedef NS_ENUM(NSInteger, UIDeviceOrientation) { 
    UIDeviceOrientationUnknown, 
    UIDeviceOrientationPortrait,   // Device oriented vertically, home button on the bottom 
    UIDeviceOrientationPortraitUpsideDown, // Device oriented vertically, home button on the top 
    UIDeviceOrientationLandscapeLeft,  // Device oriented horizontally, home button on the right 
    UIDeviceOrientationLandscapeRight,  // Device oriented horizontally, home button on the left 
    UIDeviceOrientationFaceUp,    // Device oriented flat, face up 
    UIDeviceOrientationFaceDown    // Device oriented flat, face down 
} __TVOS_PROHIBITED; 
+0

感叹。我想苹果享受他们的功能。感谢大卫的信息。 –

相关问题