iOS 7横向模式下的状态栏问题

iOS 7横向模式下的状态栏问题,ios,ios7,ios7-statusbar,Ios,Ios7,Ios7 Statusbar,我的应用程序中有一个签名屏幕,应该以横向显示,但iPhone状态栏以纵向模式显示。如何使状态栏以横向模式而不是纵向模式显示?我尝试在ViewDidLoad中将横向方向设置为状态栏,但没有成功 我使用presentViewController推送屏幕 请查找下面的代码片段以将屏幕推到横向模式 // Override to allow orientations other than the default Landscape orientation. - (NSUInteger)supportedI

我的应用程序中有一个签名屏幕,应该以横向显示,但iPhone状态栏以纵向模式显示。如何使状态栏以横向模式而不是纵向模式显示?我尝试在ViewDidLoad中将横向方向设置为状态栏,但没有成功

我使用presentViewController推送屏幕

请查找下面的代码片段以将屏幕推到横向模式

// Override to allow orientations other than the default Landscape orientation.
- (NSUInteger)supportedInterfaceOrientations {
    return UIInterfaceOrientationMaskAll;
}


- (BOOL) shouldAutorotate {
    return YES;
}


- (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation {
    return UIInterfaceOrientationLandscapeRight;
}
非常感谢您的帮助

谢谢, Ramesh

更改此方法

- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskLandscapeRight;
}

此外,该特性还包括:
在项目->常规->设备方向中,选中纵向和横向右侧。

通过添加以下方法解决

- (void)viewWillAppear:(BOOL)animated {
    [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeRight animated:NO];
}

- (void)viewWillDisappear:(BOOL)animated {
    [[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationPortrait animated:NO];

}

它在真实设备上看起来如何?相同的行为。状态栏在纵向模式下显示,但视图处于横向模式。您是如何设置UIWindow的rootViewController属性的?我想您不知道我在说什么,不是吗…?对不起,我不确定您到底在找什么?我是iOS开发新手,正在处理从iOS 6到iOS 7的升级问题