IOS设置窗口方向
默认的IOS手机端支持三个方向:Portrait(竖直),Labdscape Left(左侧横摆,左侧在上,右侧在下),Landscape Right(右侧横摆,右侧在上,左侧在下)。
如果想让窗口支持某个方向,则需要在控制器窗口中重载函数
-(UIInterfaceOrientationMask)supportedInterfaceOrientations
如果想要支持四个方向,则直接return UIInterfaceOrientationMaskAll;
或者
return (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight | UIInterfaceOrientationMaskPortraitUpsideDown)
只支持向上方向,则直接输入
return UIInterfaceOrientationMaskPortrait;