请查看虚线框区域,这是导航栏和导航栏之间出现的额外空间表格视图.
Please see the dashed-box area, this is extra space appearing between navigation bar & table view.
我已经尝试了 3 件事,但同样的问题.
1.清除所有约束&添加缺少的约束"
2.我用过pin,&与表格视图上方的 UI 对象保持0"距离
3.我用过拖拽的方法,&设置表格视图的垂直间距.
I've tried 3 things but same problem.
1. Cleared all constrains & "Add missing constrains"
2. I've used pin, & keep '0' distance to UI object above table view
3. I've used dragging method, & set vertical spacing for table view.
你需要取消勾选 attribute inspector
Adjust Scroll View Insets
使用 storyboard
见下图.
You nee to uncheck the property inside attribute inspector
Adjust Scroll View Insets
using storyboard
see image below.
调整滚动视图插图:定义一个布尔值,指示视图控制器是否应自动调整其滚动视图插图.
Adjust Scroll View Insets: Defines a Boolean value that indicates whether the view controller should automatically adjust its scroll view insets.
此属性的默认值为 true,它让容器视图控制器知道他们应该调整此视图控制器视图的滚动视图插图,以考虑状态栏、搜索栏、导航栏、工具栏所占用的屏幕区域,或标签栏.如果您的视图控制器实现管理自己的滚动视图插图调整,请将此属性设置为 false.
The default value of this property is true, which lets container view controllers know that they should adjust the scroll view insets of this view controller’s view to account for screen areas consumed by a status bar, search bar, navigation bar, toolbar, or tab bar. Set this property to false if your view controller implementation manages its own scroll view inset adjustments.
这篇关于我想将表格视图精确放置到导航栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!