1

我不知道 iOS 6 是否也会发生这种情况,但在 iOS 7 中,当启用了“共享互联网连接”选项并通过 USB 与我的计算机连接的手机时,会出现一种额外的状态栏来通知这一点。

发生这种情况时,导航栏下的视图会自动向下移动 20 像素以适应此通知栏。到目前为止没有问题,因为我的视图显示正确。但在具体的视图中,我已经因为应用程序导航了两个导航栏,其中一个是隐藏的(隐藏但仍然存在并且可以工作)。

因此系统检测到有两个导航栏,将我的一般视图向下移动 20 像素(可以适合该栏),然后将第二个视图向下移动,该视图位于第一个视图内,该视图具有隐藏的导航栏。所以最后你会在导航下看到 20 像素的视图,中间有 20 像素的空白。

有什么办法可以避免第二次自动下移?

4

1 回答 1

0

There's no way to prevent the status bar from moving your navigation bar (bars? it's unclear what you're saying on that point) as a result of internet connection sharing or a phone call. You might be able to hide the status bar and get rid of that effect, but Apple will almost certainly reject your app for hiding the status bar unnecessarily.

于 2013-10-18T13:55:52.503 回答