gpt4 book ai didi

ios - 状态栏出现在标题图像上

转载 作者:行者123 更新时间:2023-11-29 03:29:53 25 4
gpt4 key购买 nike

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

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

enter image description here

最佳答案

您有多种选择。例如:

1) 您可以在编辑 Storyboard/ Nib 时在尺寸检查器中使用 iOS 6/7 Delta。

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

#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)您可以隐藏状态栏

关于ios - 状态栏出现在标题图像上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19948439/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com