1调用以下方法:
UITableViewCell
*cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];2.报错 |
***
Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '-[UITableView
dequeueReusableCellWithIdentifier:forIndexPath:]: unrecognized selector sent to instance 0x7257800'3.分析:dequeueReusableCellWithIdentifier:forIndexPath,问题出在IndexPath上面,后来我删除了forIndexPath:indexPath,使用下面的方法:UITableViewCell
*cell = (UITableViewCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
结果就成功了,我现在用的是Xcode6.1的版本。
|
本文探讨了在iOS开发过程中遇到的UITableViewCell使用问题,通过实例分析和解决方案,帮助开发者解决在使用UITableViewCell时遇到的困惑。文章重点介绍了如何正确使用dequeueReusableCellWithIdentifier方法,并在Xcode6.1版本中解决相关报错问题。

914

被折叠的 条评论
为什么被折叠?



