UITableView以iOS 7中的偏移量开始 [英] UITableView is starting with an offset in iOS 7

查看:105
本文介绍了UITableView以iOS 7中的偏移量开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将普通简单的UITableView拖到iOS 7中的UIViewController上。

I have dragged a plain jane UITableView onto a UIViewController in iOS 7.

现在在第一个单元格开始之前有一个垂直的空间偏移量。我怎么摆脱它?我希望第一行更接近UITableView实际启动的顶部边缘。我没有要求大偏移吗?

Now there is an vertical offset of space before the first cell starts. How do I get rid of it? I want the first line to be much closer to the top edge of where the UITableView actually starts. I did not ask for the large offset did I?

任何想法?

推荐答案

通过默认表格视图控制器会将内容填充到导航栏下方,这样您就可以在其下滚动内容,并在导航栏/工具栏下方以模糊状态查看内容。

By default table view controllers will pad the content down under the nav bar so you could scroll the content under it and see it, in a blurred state, underneath the navbar/toolbar.

看起来你将它定位在44(可能是64)px将其从导航栏下移出来,但它已经补偿了这一点,所以你得到了很大的差距。

Looks like you're positioning it at 44 (maybe 64)px to move it out from under the nav bar, but it already compensates for this so you get a big gap.

转到IB中的storyboard / xib并取消导航栏内容下的节目内容。

Go to the storyboard/xib in IB and untick the show content under nav bar stuff.

这篇关于UITableView以iOS 7中的偏移量开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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