简体   繁体   中英

How to change One ViewController mode like Portrait to landscape in iOS?

I have Tabbar Controller and there I have 5 taps each having different-2 View Controller.
Now I want first ViewController (first tap) which rotate all modes like portrait, landscape left and landscape right etc. Then, I want remaining ViewControllers fixed in one mode like Portrait mode.
So how can do this?

You can use this:

- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window

This method returns a specific orientation type you want. And this value can be set in each view controller.

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