0

我正在开发一个与 iOS 7 兼容的应用程序。我的状态栏内容(如网络、电池寿命等)出现在我的标题图像中。请看一下屏幕截图,并请指导我如何解决这个问题。

** 此应用兼容 iOS>=5.0 SDK。

在此处输入图像描述

4

2 回答 2

1

你有几个选择。例如:

1) 您可以在编辑故事板/笔尖时在尺寸检查器中使用 iOS 6/7 Deltas。

2)您可以在代码中检测iOS并移动所有视图

#define SYSTEM_VERSION_EQUAL_TO(v)                  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v)              ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v)  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v)                 ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v)     ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)

//in viewDidLoad
if (SYSTEM_VERSION_LESS_THAN(@"7.0"))
{
    CGRect frame = m_web_view.frame;
    frame.origin.y = 0;
    frame.size.height += 20;
    m_web_view.frame = frame;
}

3)您可以隐藏状态栏

于 2013-11-13T08:14:41.193 回答
0

尝试这个:

 -(void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated{
      [[UIApplication sharedApplication] setStatusBarHidden:YES];

}

于 2013-11-13T08:08:53.587 回答