objective-c - 原型(prototype) UITableViewCell 不在 Storyboard 中的 UITableView 顶部

标签 objective-c uitableview uistoryboard

如问题所述:当我将原型(prototype) UITableViewCell 添加到我的 TableView 时,该单元格未显示在顶部,这是一张图片: enter image description here

如何让单元格再次出现在 TableView 的顶部?

最佳答案

问题是您的 trackViewController.automaticallyAdjustsScrollViewInsets == YES,因此 64px 的额外 topInset 将添加到其 View 中的第一个 UIScrollView(在您的情况下是 UITableView)。

您可以执行以下操作:

将表格 View 原点 y 设置为 0

将 automaticallyAdjustsScrollViewInsets 设置为 NO。

关于objective-c - 原型(prototype) UITableViewCell 不在 Storyboard 中的 UITableView 顶部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22379567/

相关文章:

objective-c - 从 NSXMLElement 获取属性的对应值

ios - 表格 View 单元格选择颜色在 0 单元格之后有效但不是第一行?

ios - 当我们在 ios 中的长按手势上有 tableview 单元格的索引路径时,如何在单元格中获取按钮的引用作为 subview

ios - 如何让多个元素能够受到 View Controller 的影响

ios - 限制 UIButton 沿 UIBezierPath 路径的移动

ios - UICollectionView 与 UIPageViewController

ios - swift 将多个独立项目居中( Storyboard)

xcode - 双击 Segue 移动到下一个 Storyboard

ios - 在 iOS 中通过 URL 播放视频

iphone - 表格 View 滚动缓慢的问题