开发者

iOS application's orientation remember?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜