dequeueReusableCellWithIdentifier 从不返回 [英] dequeueReusableCellWithIdentifier never returns

查看:51
本文介绍了dequeueReusableCellWithIdentifier 从不返回的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我调用 dequeueReusableCellWithIdentifier 时,它冻结了我的代码并且从不返回任何单元格(或 nil)我将代码从我的自定义类更改为 UITableViewCell 为确保问题不在我的班级中,我还创建了一个全新的空单元格以使用标识符进行调用.

When I call dequeueReusableCellWithIdentifier it is freezing my code and does never return any cell (or nil) I change the code from my custom class to a UITableViewCell to be sure the problem wasn't in my class, I also create a brand new empty cell to call with the identifier.

我在调用 dequeueReusableCellWithIdentifier 之前和之后添加了一个日志,如您在屏幕截图中看到的那样,之前被调用一次,之后从未被调用.

I add a log before and after the call for dequeueReusableCellWithIdentifier as you can see in the screenshot the one before gets called once and the one after never.

我尝试清理和构建,清理项目文件夹,删除派生数据,重新启动计算机.我看不到任何异常或真正持有代码的东西.

I try to clean and build, clean the project folder, delete DerivedData, restart the computer. I can't see any exceptions or what is really holding the code.

有什么建议吗?

推荐答案

表示你正在打印println("return dequeueReusableCellWithIdentifier"),但是看不到你的返回单元格 函数末尾的代码,必须符合函数期望.

It is expressed that you are printing println("return dequeueReusableCellWithIdentifier"), but can't see your return cell code at the end of your function, that must conform to your function expectation.

这篇关于dequeueReusableCellWithIdentifier 从不返回的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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