正如您从我的图像中看到的,状态栏显示在我的表格视图的顶部,我不明白我做错了什么导致这种情况发生。我确信这将是一个简单的修复,但我只是想念它。
任何帮助将不胜感激,谢谢!
您可以通过在 ViewDidLoad 方法中编写以下代码来避免此问题...
float SystemVersion=[[[UIDevice currentDevice] systemVersion] floatValue];
if(SystemVersion<7.0f)
{
//Currently your app is running in IOS6 or older version. So you need not to do anything.
}
else
{
// Currently your app is running in IOS7. Do the following.
CGRect TempRect;
for(UIView *sub in [[self view] subviews])
{
TempRect=[sub frame];
TempRect.origin.y+=20.0f; //Height of status bar
[sub setFrame:TempRect];
}
}
让我知道它是否有效我的朋友!
快乐编码!!!
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)