开发者

I want my application to start in portrait, but want a second view to start in landscape, how do I do this?

开发者 https://www.devze.com 2023-02-02 18:52 出处:网络
I know the way to get your app to be l开发者_运维百科andscape is to go and make it that way in the info.plist file, but I want my second view to start in landscape. How do i do this?Create a new view

I know the way to get your app to be l开发者_运维百科andscape is to go and make it that way in the info.plist file, but I want my second view to start in landscape. How do i do this?


Create a new view controller for your second view and present it modally.

In your new view controller implement:

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

to return only the orientations you wish to support.


See also

How to force horizontal orientation?

0

精彩评论

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