I have 5 views in the storyboard. I want each view orientation to be different, for example, one view will be UIInterfaceOrientationLandscapeRight another view will be UIInterfaceOrientationLandscapeLeft or UIInterfaceOrientationPortrait or UIInterfaceOrientationPortraitUpsideDown . So, how to set this view orientation in different ways.
I used [[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight]; but it shows the warning "UIDevice may not respond to setOrientation". According to many stackoverflow authors, I use
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
this code above, but it does not work in my project. So what is the correct screen orientation procedure. Thanks in advance.
source share