为什么我的UITableView顶部有额外的填充,iOS7中的样式为UITableViewStyleGrouped [英] Why is there extra padding at the top of my UITableView with style UITableViewStyleGrouped in iOS7
问题描述
从iOS7开始,我的 UITableView
顶部有额外的空间,其样式 UITableViewStyleGrouped
。
Starting in iOS7, there is additional space at the top of my UITableView
's which have a style UITableViewStyleGrouped
.
以下是一个例子:
tableview从第一个箭头开始,有35个像素的无法解释的填充,然后是绿色标题是 viewForHeaderInSection
返回的 UIView
(其中该部分为0)。
The tableview starts at the first arrow, there is 35 pixels of unexplained padding, then the green header is a UIView
returned by viewForHeaderInSection
(where the section is 0).
任何人都可以解释这个35像素的数量来自何处以及如何在不切换到 UITableViewStylePlain
的情况下摆脱它?
Can anyone explain where this 35 pixel amount is coming from and how I can get rid of it without switching to UITableViewStylePlain
?
推荐答案
我得到了以下方面的帮助:
I was helped by the following:
YouStoryboard.storyboard > YouViewController>属性检查器>取消选中 - 调整滚动视图插入。
YouStoryboard.storyboard > YouViewController > Attributes inspector > Uncheck - Adjust scroll view insets.
这篇关于为什么我的UITableView顶部有额外的填充,iOS7中的样式为UITableViewStyleGrouped的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!