开发者

three20 datasource and table issue

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜