为什么我的UITableView顶部有额外的填充,iOS7中的样式为UITableViewStyleGrouped [英] Why is there extra padding at the top of my UITableView with style UITableViewStyleGrouped in iOS7

查看:75
本文介绍了为什么我的UITableView顶部有额外的填充,iOS7中的样式为UITableViewStyleGrouped的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从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屋!

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