UI_cell 注册问题
来源:互联网 发布:冰点降低数据法 编辑:程序博客网 时间:2024/05/22 06:15
如果用方法:
[tableView dequeueReusableCellWithIdentifier:(NSString *) forIndexPath:(NSIndexPath *)];
定义cell ,会出现下面错误提示信息
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier ActiveListCell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard'
此时需要注册
[tableView registerClass:[ActiveTableViewCell class] forCellReuseIdentifier:@"ActiveListCell"];
如果用方法:
[tableView dequeueReusableCellWithIdentifier:(NSString *)];
则可以不必注册,但是要写判断
if (cell == nil) { cell = [[[NSBundle mainBundle] loadNibNamed:@"ActiveTableViewCell" owner:self options:nil] firstObject]; }
1 0
- UI_cell 注册问题
- 关于CSDN注册问题
- BoundCheck5.02注册问题
- SQLyog注册的问题
- IrisSkin2.dll 注册问题
- IDM注册的问题
- myeclipse注册到期问题
- 控件注册问题
- 网站自动注册问题
- ocx注册问题
- 注册组件失败问题
- comdlg32.ocx 注册问题
- register_chrdev_region()注册的问题
- oracle注册问题
- myeclipse8.5 注册问题
- ocx控件注册问题
- ActiveX控件注册问题
- BHO注册问题
- Bootstrap tab left css
- [SD-Card]内部结构原理与分区等
- 【基础】java 循环语句
- Android keyevent 整理
- 安装禅道
- UI_cell 注册问题
- javascript中获取string的长度
- Servlet中Web.xml的配置详解
- 选用神经网络还是支持向量机
- 我的人生和我的程序
- linux源码,list_entry阅读心得
- android 如何添加一种新的语言
- imadjust
- css中设置图片的显示与隐藏