作者:____L振豪 | 来源:互联网 | 2023-01-17 16:17
我们正在将我们的移动应用程序升级到ios 11,但是有一个问题我无法找到任何解决方案.
在IOS 10中,我们使状态栏和导航控制器透明,因此导航控制器下方的图像从屏幕顶部开始.但是,当我使用xcode 9和ios 11构建相同的代码时,结果变为如下:
我们在IOS 10和xcode 8中使用的代码如下所示.您知道IOS 11中有关导航栏或状态栏的更改吗?
if ([self.viewModel profileImage]) {
if (diff <= 0) {
self.statusBarBackground.alpha = 1.0;
} else {
self.statusBarBackground.alpha = 1.0;
self.statusBarBackgroundHeight.cOnstant= MIN(statusBarHeight, diff);
}
}
谢谢
1> 小智..:
尝试设置contentInsetAdjustmentBehavior
if #available(iOS 11.0, *) {
tableView.cOntentInsetAdjustmentBehavior= .never
}
要么
if #available(iOS 11.0, *) {
scrollView.cOntentInsetAdjustmentBehavior= .never
}