首页 > 代码库 > IOS某个ViewController禁止自动旋转

IOS某个ViewController禁止自动旋转

IOS屏幕自动旋转,强制横竖屏方法:

- (BOOL)shouldAutorotate{    return YES;}- (NSUInteger)supportedInterfaceOrientations{    return (UIInterfaceOrientationMaskAll);// 修改这里 控制显示方向}- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{    return (interfaceOrientation == UIInterfaceOrientationPortrait);}