Assertion failure in dequeueReusableCellWithIdentifier:forIndexPath:

前端 未结 22 1319
长情又很酷
长情又很酷 2020-11-22 10:10

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         


        
22条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-22 11:03

    If you are going with Custom Static Cells just comment this method:

    //- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    //    static NSString *CellIdentifier = @"notificationCell";
    //    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
    //    return cell;
    //}
    

    and give the cells an identifier at "Attributes Inspector" in storyboard.

提交回复
热议问题