我想将表格视图精确放置到导航栏

I want to place Table View exact down to navigation bar(我想将表格视图精确放置到导航栏)
本文介绍了我想将表格视图精确放置到导航栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请查看虚线框区域,这是导航栏和导航栏之间出现的额外空间表格视图.

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.

这篇关于我想将表格视图精确放置到导航栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Why local notification is not firing for UNCalendarNotificationTrigger(为什么没有为UNCalendarNotificationTrigger触发本地通知)
iOS VoiceOver functionality changes with Bundle Identifier(IOS画外音功能随捆绑包标识符而变化)
tabbar middle tab out of tabbar corner(选项卡栏中间的选项卡角外)
Pushing UIViewController above UITabBar(将UIView控制器推送到UITabBar上方)
Dropbox Files.download does not start when number of files in folder is gt; 1000(当文件夹中的文件数为1000时,Dropbox Files.Download不会启动)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)