I am getting this error in iOS 5
-[UITableView dequeueReusableCellWithIdentifier:forIndexPath:]: unrecognized selector sent to instance 0xa217200
Here's why you're getting the error. As per the iOS 6.0 Documentation Set the UITableView Class Reference states that dequeueReusableCellWithIdentifier:
is available in iOS 2.0 and later and dequeueReusableCellWithIdentifier:forIndexPath:
is available in iOS 6.0 and later.
EDIT: This method is newly added in iOS6+ SDK.
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
But in iOS 5, to create instance of UITableViewCell
we generally use this method :-
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
In iOS 5, there is no need of extra parameter which you have used in iOS 6. (forIndexPath:).
So change your method. It will work.