关于强制竖屏变横屏

Posted iOS_XL_NSArray

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了关于强制竖屏变横屏相关的知识,希望对你有一定的参考价值。

#import "CustomNavigationController.h"

@interface CustomNavigationController ()

@end

@implementation CustomNavigationController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {

    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


-(BOOL)shouldAutorotate
{
    return NO;
    
}


-(NSUInteger)supportedInterfaceOrientations{
    //return UIInterfaceOrientationMaskLandscapeRight;
    return self.orietation;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation != self.orietation);
}

以上是关于关于强制竖屏变横屏的主要内容,如果未能解决你的问题,请参考以下文章

IQKeyboardManager 横屏后 Toolbar 显示异常

电脑怎么变横屏?

Rk3288 7.1.1安卓源码设置屏幕竖屏或横屏

系统强制横屏竖屏

GPHONE:android如何实现横屏

Android开发中如何强制横屏和强制竖屏设置