Reputation: 2002
My app is a portrait app, now I want to put a view controller in landscape. There's a easy way to do that? I set the device info only in portrait now I've a view controller in which there are a media player and I think it's better to watch this video in landscape mode. I tried this methods:
- (BOOL)shouldAutorotate
: doesn't work- (NSUInteger)supportedInterfaceOrientations
: doesn't worksYou know if there's a way to solve this without redo all app inserting category?
Upvotes: 1
Views: 159
Reputation: 1521
You have 2 things to do :
Set the supported device orientations on the target info
Set the (NSUInteger)supportedInterfaceOrientations
method for your viewController. If this view is only supposed to show the video I guess you should only allow UIInterfaceOrientationMaskLandscape
.
Upvotes: 2