I want to change device orientation for only one UiViewController. My first UiViewController's name is VideoLaunch. I want Landscape orientation in this UiViewController firstly. When I pass another uiviewcontroller I change a static value which name is "is" to different from nil. When i run in debug mode i see
else return UIInterfaceOrientationMaskPortrait
this line runs. But orientation doesn't change.
AppDelegate.m
- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window {
if([VideoLaunch is] == nil)
return UIInterfaceOrientationMaskLandscape;
else return UIInterfaceOrientationMaskPortrait;
}