如何让我的视图从ios6中的statusbar开始,就像ios7中的那样

时间:2020-12-11 07:11:18

Not sure about the title of this question... it's a work in progress.

不知道这个问题的题目是什么……这是一项正在进行的工作。

Anyway, while the internets are full of folks that want to make their ios7 status bar behave the old way, i'm fine with that. However, my problem now is that the view that starts at y=0 in IOS7 jumps down under the status bar in IOS6.

不管怎么说,虽然internet上满是希望让ios7状态栏按照旧方式运行的人,但我对此没有意见。然而,我现在的问题是,IOS7中从y=0开始的视图在IOS6的状态栏下向下跳。

I can and have solved this with the 'delta' ios6/7 thing in interface builder, but i would rather have my views behave exactly the same way, i.e. my top 20 pixels can be seen in IOS7, but are hidden by a black bar in IOS6. This means that all objects end up in the same Y position before and after IOS7 if you see what i mean.

我可以并且已经用接口构建器中的“delta”IOS6 /7解决了这个问题,但是我宁愿让我的视图以完全相同的方式运行,也就是说,我的前20个像素可以在IOS7中看到,但是被IOS6中的黑色条隐藏。这意味着所有对象在IOS7前后的Y轴位置都是相同的。

I've tried all sorts of stuff to no avail. Is there an easy way to tell xcode that i want my view to start at position 0 and disregard the statusbar in IOS6?

我试了各种各样的东西都没用。有没有一种简单的方法来告诉xcode我想让我的视图从0位置开始,而忽略IOS6中的statusbar ?

1 个解决方案

#1


1  

Just try this in all view's viewDidLoad

在viewDidLoad中尝试这个。

self.wantsFullScreenLayout = YES;

#1


1  

Just try this in all view's viewDidLoad

在viewDidLoad中尝试这个。

self.wantsFullScreenLayout = YES;