【发布时间】:2015-12-10 12:45:48
【问题描述】:
我在情节提要中制作了原型单元并设置了它的标识符,但是当我调用时
cell=[tableView dequeueReusableCellWithIdentifier:@"ident" forIndexPath:indexPath];
在我的 cellForRowAtIndexPath 方法中我得到了异常:
unable to dequeue a cell with identifier ident - must register a nib or a class for the identifier or connect a prototype cell in a storyboard
现在,我知道,如果我在情节提要中声明一个原型单元,我不需要显式注册它。 那么...为什么会出现这个异常?
【问题讨论】:
-
您是否在情节提要中设置了您的单元格标识符?
-
是的,我用图片更新答案
-
标识符为
voce的UITableViewCell在哪里?这可能是导致异常 -
不,它有效(已经尝试过)如果您阅读下面的异常,您阅读
cella_opzioni_menu
标签: ios objective-c uitableview storyboard tableviewcell