关于强制竖屏变横屏
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);
}
以上是关于关于强制竖屏变横屏的主要内容,如果未能解决你的问题,请参考以下文章