设备旋转的顶层空间 [英] Top space on device rotation

查看:112
本文介绍了设备旋转的顶层空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在纵向模式下对我的UIView有以下限制:

I have the following constraints on my UIView in portrait mode:

景观:

这是截图第一次打开它时的ViewController:

This is screenshot of the ViewController when I open it first time:

Top空间没问题。

然后我将设备旋转到横向:

Then I'm rotating the device to landscape:

你看到顶部有空格吗?

当我正在将它旋转回景观,空间仍然存在:

And when I'm rotating it back to landscape, the space still stays:

为什么以及如何修复它?

Why and how to fix it?

推荐答案

尝试取消选中调整scrollview insets of viewcontroller属性

Try to uncheck Adjust scrollview insets Of viewcontroller attribute

图片来源:此处

这篇关于设备旋转的顶层空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆