Assertion failure in dequeueReusableCellWithIdentifier:forIndexPath:

前端 未结 22 1456
长情又很酷
长情又很酷 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条回答
  •  猫巷女王i
    2020-11-22 10:42

    I think this error is about registering your nib or class for the identifier.

    So that you may keep what you are doing in your tableView:cellForRowAtIndexPath function and just add code below into your viewDidLoad:

    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"Cell"];
    

    It's worked for me. Hope it may help.

提交回复
热议问题