//强制横屏显示
-(BOOL)shouldAutorotate
{
return YES;
}
//设置屏幕支持的方向
-(UIInterfaceOrientationMask)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight;
}
#pragma mark 设置状态栏状态
//隐藏顶部状态栏
-(BOOL)prefersStatusBarHidden
{
return NO;
}
//设置状态栏的样式
-(UIStatusBarStyle)preferredStatusBarStyle
{
return UIStatusBarStyleLightContent;
}
//在手机屏幕翻转时会调用这个方法去重新布局界面.如果界面需要适配横屏和竖屏状态,界面布局的代码需要写在这
-(void)viewWillLayoutSubviews
{
}