So I was making an rss reader for my school and finished the code. I ran the test and it gave me that error. Here is the code it\'s referring to:
- (UITableV
You're using the dequeueReusableCellWithIdentifier:forIndexPath: method. The documentation for that method says this:
Important: You must register a class or nib file using the
registerNib:forCellReuseIdentifier:orregisterClass:forCellReuseIdentifier:method before calling this method.
You didn't register a nib or a class for the reuse identifier "Cell".
Looking at your code, you seem to expect the dequeue method to return nil if it doesn't have a cell to give you. You need to use the dequeueReusableCellWithIdentifier: for that behavior:
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
Notice that dequeueReusableCellWithIdentifier: and dequeueReusableCellWithIdentifier:forIndexPath: are different methods. See doc for the former and the latter.
If you want to understand why you'd want to ever use dequeueReusableCellWithIdentifier:forIndexPath:, check out this Q&A.