开发者

three20 datasource and table issue

开发者 https://www.devze.com 2023-03-20 01:22 出处:网络
Why am I getting the following error: *** Assertion failure in -[TTTableView _createPreparedCellForGlobalRow:withIndexPath:], /SourceCache/UIKit_Sim/UIKit-1448.89/UITableView.m:5678

Why am I getting the following error:

*** Assertion failure in -[TTTableView _createPreparedCellForGlobalRow:withIndexPath:], /SourceCache/UIKit_Sim/UIKit-1448.89/UITableView.m:5678
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:'
*** Call stack at first throw:

How do I fix this?

the point where it stops is:

- (void)layoutSubviews {
  [super layoutSubviews]; //right here开发者_如何学编程

this is inside TTTableView.m


'UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:'

There's your answer. You must be returning a cell. Either your datasource isn't set or tableView:cellForRowAtIndexPath: isn't returning anything.


I had the same issue when using RestKit + Three20 to populate a TTTableViewController with CoreData objects.

Turns out that the RKObjectManager's objectStore property wasn't set properly. I fixed it in the App initialization then the TTTableViewController was populated successfully.

0

精彩评论

暂无评论...
验证码 换一张
取 消