I have 5 view in storyboard. I want each view orientation will be different for example one view will be UIInterfaceOrientationLandscapeRight
another view will be UIInterfaceOrientationLandscapeLeft
or UIInterfaceOrientationPortrait
or UIInterfaceOrientationPortraitUpsideDown
. So how do set this orientation of view different.
I have used
[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight];
but it show warning 'UIDevice may not responds to setOrientation'. According to many of the stackoverflow writers I am using
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
//return UIInterfaceOrientationLandscapeLeft;
return (toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown);
}
this above code but it is not working in my project. So what is the proper procedure for the orientation of the screen. Thanks in advance.