当 iPad 旋转滚动视图时,滚动视图未与屏幕顶部对齐
当 iPad 模拟器更改方向时,uiscrollview 的内容不再与顶部对齐。当应用程序以横向方式启动时,一切都很好 - 滚动视图中包含的控件(应该位于最顶部)位于顶部。从纵向开始时也是如此。 然而,当它旋转时,如果从横向旋转到纵向,顶部会出现很大的间隙,或者如果从纵向旋转到横向,顶部的许多间隙都会超出屏幕的顶部。 请问有人知道我应该注意什么才能解决这个问题吗?
谢谢
When the iPad simulator changes orientation the contents of the uiscrollview no longer are aligned to the top. When the app starts in landscape all is well - the controls contained in the scrollview which should be the top most are at the top. The same is true when it starts in portrait.
However, when it is rotated there is a large gap at the top if it was from landscape to portrait or many of those at the top are off the top of screen if it rotates from portrait to landscape.
Does anyone have any ideas what I should be looking at in order to fix this, please?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正如 Rob 所说 - 需要确保 UIScrollView 锚定在顶部、底部、左侧和右侧,并在垂直和水平方向上拉伸。
As Rob says - needed to make sure the UIScrollView is anchored top, bottom, left, and right with stretching in vertical and horizontal directions.