how to set Orientation after launch on iPhone

2019-01-25 00:42发布

i Will like to know how to auto rotate iphone after launch.

my launch image is in portraits but the app itself are in landscape.

after launch the orientation are still in portraits instead of auto rotate to landscape.

this is my info.plist

enter image description here

in my root view controller

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

}

2条回答
兄弟一词,经得起流年.
2楼-- · 2019-01-25 01:26

enter image description here

as shown in the image, set the marked value for landscape mode..

查看更多
再贱就再见
3楼-- · 2019-01-25 01:31

In iphone Launch images are always in portrait mode, You can make launch image such that it looks like it is in landscape but actually it will be in portrait mode

While ipad has option for launch image in both mode landscape and portrait

查看更多
登录 后发表回答