这个问题使我难过了几天。
这是与我相关的情节提要板布局:我将所有阳光视图下的所有布局都设置为所有三个View Controller,并且仍然在“横幅”视图上方获得一个带有“间隙”的结果表视图-看起来与“横幅”视图的高度相同。如下:
起作用的一件事是将容器视图拖动到底部的横幅视图上,如下所示:
结果完美地呈现在我的测试设备以及每个模拟器上-即无间隙。
但是,这样的解决方案本质上是种黑客手段,我想看看是否有什么我可以做的才能正确解决此问题。
For the record, I have tried every option in the IB - adjust scroll view insets, extend edges under top/bottom bars, etc... as well as various code snippets I have googled here and there. Nothing seems to solve the issue for me.
I managed to solve the gap at the top of the table view under the nav bar (seemingly a common issue with a lot of content out there). But there does not seem to be so many cases like mine above.
Any help or indications are greatly appreciated. Thank you people :-)
* ADDITIONAL INFORMATION *
As per a comment below, I add the constraints I have tried for the said container:
OK. Essentially, with the kind assistant of @beyowulf I realised my current setup had to be changed.
I was
unnecessarily using a container view in your tabbarcontroller
as he correctly indicated
您的表格视图控制器无法推断它在tabbarviewcontroller中。
为了使表格视图控制器与容器视图的底部齐平,我不得不
直接将导航控制器嵌入tabbarviewcontroller中,并调整表格视图的底部插图。
我是通过顶部菜单栏项完成此操作的:
如果愿意,您可以轻松地将导航控制器合并到情节提要中,我也这样做。
方便的提示和我要解决的“差距”问题出现在底部的标签栏上方。
希望这对可能也会遇到相同问题的所有人有所帮助。
再次感谢@beyowulf。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句