1.将4个勾勾上 默认控制器view都能4方向旋转 如需做特定旋转方向 执行第二步
//
禁止旋转
- ( BOOL )shouldAutorotate
{
return NO ;
}
- ( BOOL )shouldAutorotate
{
return NO ;
}
- (
NSUInteger
)supportedInterfaceOrientations
{
/* 以 home 键为准 上下左右
UIInterfaceOrientationMaskPortrait 正常状态 home 键在下
UIInterfaceOrientationMaskPortraitUpsideDown 从下旋转 home 键在上
UIInterfaceOrientationMaskLandscapeLeft home 键在左面
UIInterfaceOrientationMaskLandscapeRight home 键在右面
UIInterfaceOrientationMaskLandscape 支持左和右旋转
UIInterfaceOrientationMaskAllButUpsideDown 支持正常和左右旋转
UIInterfaceOrientationMaskAll 支持 4 个方向旋转
{
/* 以 home 键为准 上下左右
UIInterfaceOrientationMaskPortrait 正常状态 home 键在下
UIInterfaceOrientationMaskPortraitUpsideDown 从下旋转 home 键在上
UIInterfaceOrientationMaskLandscapeLeft home 键在左面
UIInterfaceOrientationMaskLandscapeRight home 键在右面
UIInterfaceOrientationMaskLandscape 支持左和右旋转
UIInterfaceOrientationMaskAllButUpsideDown 支持正常和左右旋转
UIInterfaceOrientationMaskAll 支持 4 个方向旋转
*/
return
UIInterfaceOrientationMaskLandscapeRight
;
}