iOS 7 UITableView:如何删除导航栏和第一个单元格之间的空间 [英] iOS 7 UITableView: How to remove space between navigation bar and first cell

查看:109
本文介绍了iOS 7 UITableView:如何删除导航栏和第一个单元格之间的空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是:iOS 7分组 UITableView 表格顶部与第一个单元格存在差距。

my problem is: with iOS 7 in grouped UITableView there is a gap from the top of the table and the first cell.

奇怪的是,当我第一次加载内容时,表格在第一张图片中显示为ok,但是当我向下滚动时,顶部和第一个单元格之间出现空格,如第二个:

The strange is that when I load the content for the first time the table appears ok like in the first image, but when I scroll down a space appears between top and first cell like in the second:

对于样式,这种行为不会出现,但不幸的是我需要使用分组表视图。

With style plain this behavior does't came out but unfortunately I need to use grouped table view.

有关的想法吗?

推荐答案

只需将此添加到您 ViewDidLoad 方法

self.automaticallyAdjustsScrollViewInsets = NO;

这篇关于iOS 7 UITableView:如何删除导航栏和第一个单元格之间的空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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