简体   繁体   中英

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

I know the way to get your app to be landscape 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM