带有 iOS 9 beta 5 更新的 UITableView Empty [英] UITableView Empty with iOS 9 beta 5 update

查看:22
本文介绍了带有 iOS 9 beta 5 更新的 UITableView Empty的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的 iPhone 上更新到 Xcode 7 和 iOS 9 beta 5 后,我的 UITableViews 都没有显示数据,只有一个.他们都从我的 Parse 数据库下载信息,而一个有效的,正在为表格的一个部分完美地下载所有内容,而不是另一个.其他 3 个表视图下载信息,并计算正确的行数,但没有显示任何内容.我尝试只显示所有单元格的静态文本,但它甚至没有显示.

After updating to Xcode 7 and then the iOS 9 beta 5 on my iPhone, none of my UITableViews are displaying data, except one. They are all downloading information from my Parse database, and the one that works, is downloading everything perfectly for one section of the table, but not the other. The other 3 table views download the information, and calculate the correct number of rows, however nothing is being displayed. I tried just displaying static text for all cells, however it is not even displaying that.

有什么线索吗?我认为下载 Parse 数据没有问题,但实际上将其显示到 tableview 上.

Any clue of what is going on? I don't think it is a problem with downloading the Parse data, but actually displaying it onto the tableviews.

 let cell:MyChinupsTableViewCell = tableView.dequeueReusableCellWithIdentifier("Cell") as! MyChinupsTableViewCell

    if namesArray.count > 0 {
        cell.nameLabel.text = namesArray[indexPath.row]
        cell.bodyText.text = chinUpsArray[indexPath.row]
        let count = likesArray[indexPath.row]
        cell.likeCount.text = "♥︎ " + String(count)

    }

    return cell

这是另一个表格视图,但它仍然能说明问题.除非我遗漏了什么,否则这里的一切都在正确的层次结构中.

It is another table view, but it still gets the point across. Unless I am missing something, everything is in the correct hierarchy here.

我添加了该标签作为测试,但它并没有出现...

I added that label as a test, and that is not appearing as well...

这是在视图调试器中的样子.如您所见,它正确下载了正确数量的行... 2 次谢谢和 4 次以上的对话.

This is what it looks like in the view debugger. As you see, it correctly downloaded the correct amount of rows... 2 Thank You's and 4+ conversations.

推荐答案

我不能说这是否是一个通用的解决方案,但在完全相同的情况下(更新到 XCode 7 beta 5 后,tablviewcell 内容在运行时为空)这个帮我解决了:

I can't say if this is a universal solution, but in the exact same scenario (tablviewcell content empty at runtime after updating to XCode 7 beta 5) this solved it for me:

我必须检查内容视图中的每个项目(包括所有约束),并在属性检查器中勾选已安装"复选框.最初只检查了 wR hR.

I had to go through every single item inside the content view (including all constraints) and tick the checkbox "Installed" in the properties inspector. Initially only wR hR was checked.

这篇关于带有 iOS 9 beta 5 更新的 UITableView Empty的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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