---
title: "[ios]-[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] ERROR"
author: "119568242"
date: "2013-08-08T20:03:04Z"
tags: []
categories: ["移动开发"]
slug: "ios-uitableview-dequeuereusablecellwithidentifier-forindexpath-error"
draft: false
lastmod: "2013-08-08T20:03:04Z"
id: 1922211
url: "https://poolo.iteye.com/blog/1922211"
---

-\[UITableView dequeueReusableCellWithIdentifier:forIndexPath:] ERROR

UITableViewCell \*cell = (UITableViewCell \*)\[tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];

?

\*\** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-\[UITableView dequeueReusableCellWithIdentifier:forIndexPath:]: unrecognized selector sent to instance 0x7257800'

 今天新建立一个TableView的时候，偶然发现这样的错误，因为用的是XCode自己生成的代码，好奇怪，想了想到底是为什么呢？

看了下Documents，oh shit！我用的Base 是5.0SDK.

?

Available in iOS 6.0 and later.

 遂改之：

UITableViewCell \*cell = (UITableViewCell \*)\[tableView dequeueReusableCellWithIdentifier:CellIdentifier];