2012-01-30 54 views
1

我想知道如何在启动后自动旋转iphone。如何在iPhone上启动后设置方向

我的启动图像是在肖像中,但应用程序本身在横向。

发射后方向仍然在人像中,而不是自动旋转到风景。

这是我的info.plist

enter image description here

在我的根视图控制器

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    // Return YES for supported orientations 
    return ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight)); 

} 
+0

只你在potrait的启动屏幕,并在景观休息? – 2012-01-30 06:49:41

回答

4
enter image description here

如所示的图像中,设置风景模式标记值。 。

+0

但我的启动图像处于纵向模式时 – Desmond 2012-01-30 06:37:25

+2

确定然后,发射后的图像进行运行这一步, \t [UIApplication的sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeLeft]。 – vishy 2012-01-30 06:53:07

+0

有[官方指南](http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/AdvancedAppTricks/AdvancedAppTricks.html#//apple_ref/doc/uid/TP40007072-CH7-SW9 )推出横向应用程序 – 2012-07-30 15:40:12

1

在iphone中启动图像总是在纵向模式下,你可以启动图像,使得它看起来是在景观,但实际上它会在肖像模式

虽然iPad已经在这两个模式的风景启动图像和人像选项