原型 UITableViewCell 不在 Storyboard 中 UITableView 的顶部 [英] Prototype UITableViewCell is not at top of UITableView in Storyboard
问题描述
正如问题已经说的那样:当我将原型 UITableViewCell 添加到我的 TableView 时,单元格没有显示在顶部,这是一张图片:
As the questions already says: When I add a prototype UITableViewCell to my TableView, the cell is not displayed at the top, here is a image:
如何让单元格再次出现在 TableView 的顶部?
How can I get the cell to the top of my TableView again?
推荐答案
问题是你的 trackViewController.automaticallyAdjustsScrollViewInsets == YES,所以额外的 64px 的 topInset 将被添加到它的视图中的第一个 UIScrollView(在你的情况下这是 UITableView).
The problem is that your trackViewController.automaticallyAdjustsScrollViewInsets == YES, so additional topInset of 64px will be added to first UIScrollView in its view (this is UITableView in your case).
您可以执行以下操作:
设置表格视图原点 y 为 0
Set table view origin y to 0
或
将 automaticAdjustsScrollViewInsets 设置为 NO.
set automaticallyAdjustsScrollViewInsets to NO.
这篇关于原型 UITableViewCell 不在 Storyboard 中 UITableView 的顶部的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!