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

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

问题描述

我已经将一个普通的 jane 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,在nav bar stuff下取消勾选显示内容.

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

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

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