Temeier Temeier - 3 months ago 12x
Objective-C Question

How to use UIInterfaceOrientationPortrait and UIInterfaceOrientationLandscapeLeft

I have a project whose

is a
, and in my project only the view controller loading a full screen
. I need to change its orientation.

I have finished fixing the issue, but there's some trouble: When a user is in the view controller with the web view in the landscape orientation then clicks the back button, the previous view controller is also in landscape orientation. I want it to be in portrait, however. Any ideas on how to do this?

If you can read Chinese, I found this page, thanks.



- (NSUInteger)supportedInterfaceOrientations
    return UIInterfaceOrientationMaskPortrait;

for whatever viewcontroller you require to stay in portrait.