控制控制器只支持横/竖屏

重写控制器如下方法即可:

 1 - (NSUInteger)supportedInterfaceOrientations
 2 
 3 {
 4 
 5     /*
 6 
 7      UIInterfaceOrientationMaskPortrait
 8 
 9      UIInterfaceOrientationMaskLandscapeLeft
10 
11      UIInterfaceOrientationMaskLandscapeRight
12 
13      UIInterfaceOrientationMaskPortraitUpsideDown
14 
15      UIInterfaceOrientationMaskLandscape = (UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight),
16 
17      UIInterfaceOrientationMaskAll = (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight | UIInterfaceOrientationMaskPortraitUpsideDown),
18 
19      UIInterfaceOrientationMaskAllButUpsideDown = (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight),
20 
21      */
22 
23     return UIInterfaceOrientationMaskLandscape;
24 
25 }

 

posted @ 2015-10-17 21:38  Rinpe  阅读(205)  评论(0编辑  收藏  举报