iOS中控制器的方向

#import "LKNavigationController.h"


@interface LKNavigationController ()


@end


@implementation LKNavigationController

#pragma mark - 实现这个方法来控制屏幕方向

/**

 *  控制当前控制器支持哪些方向

 *  返回值是UIInterfaceOrientationMask*

 */

-(NSUInteger)supportedInterfaceOrientations

{

    /**

     *  UIInterfaceOrientationMaskPortrait : 竖屏(正常)

     *  UIInterfaceOrientationMaskPortraitUpsideDown : 竖屏(上下颠倒)

     *  UIInterfaceOrientationMaskLandscapeLeft : 横屏向左

     *  UIInterfaceOrientationMaskLandscapeRight : 横屏向右

     *  UIInterfaceOrientationMaskLandscape : 横屏(横屏向左\横屏向右)

     *  UIInterfaceOrientationMaskAll : 全部方向(包括上面的所有情况)

     */

    return UIInterfaceOrientationMaskPortrait;

}


郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。