开发者

iOS application's orientation remember?

开发者 https://www.devze.com 2023-04-09 20:27 出处:网络
I have several view controllers, which maintains only landscape mode and one view controller with all interface orientations(for example, slideshow). \"Splash screen\" can only in landscape mode. Afte

I have several view controllers, which maintains only landscape mode and one view controller with all interface orientations(for example, slideshow). "Splash screen" can only in landscape mode. After "slideshow" is in portrait mode and I fully terminate application(from task bar too), application starts a "splash screen"(what should in landscape mode) unexpectly in portrait. But why it happens, 开发者_如何学运维if splash screen is actually not rotates in portrait if device rotated? And how to resolve this problem? Thanks.


In your SplashScreenViewController write:-

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {

    return (interfaceOrientation == UIInterfaceOrientationLandscapeRight || interfaceOrientation == UIInterfaceOrientationLandscapeLeft);

}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号