UITableView相关错误

来源:互联网 发布:巡更棒作弊软件 编辑:程序博客网 时间:2024/06/05 12:00

tableView相关

Assertion failure in -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:]

错误描述

  • Assertion failure in -[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] /SourceCache/UIKit_Sim/UIKit-2935.137/UITableView.m:5439

    2014-07-28 10:53:13.402 TableViewDemo[1783:60b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier tableSampleIndentifier - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'

解决方案:

tableView:cellForRowAtIndexPath:中的函数调用dequeueReusableCellWithIdentifier:forIndexPath:换成dequeueReusableCellWithIdentifier:

0 0
原创粉丝点击