我想将Table View精确放到导航栏 [英] I want to place Table View exact down to navigation bar

查看:124
本文介绍了我想将Table View精确放到导航栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请参阅虚线框区域,这是导航栏和&之间出现的额外空间。表格视图。

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.

推荐答案

您需要取消选中属性检查器 调整滚动视图插入使用 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.

这篇关于我想将Table View精确放到导航栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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