How to get default LandscapeLeft Orientation in iOS5?

前端 未结 4 1083

Sorry if this question is duplicate, but I can\'t find the same solution. In iOS6, if I want to set default orientation for one UIViewController, I just use:

- (         


        
4条回答
  •  萌比男神i
    2021-01-28 02:48

    - (BOOL)shouldAutorotate {
    
    UIInterfaceOrientation orientation = [[UIDevice currentDevice] orientation];
    
    if (orientation==UIInterfaceOrientationPortrait) {
     // do some 
    
    }
    
    return YES;
    }
    

    Include both the methods to support both 5 and 6

提交回复
热议问题