Getting this error when I load my tableview and I'm not sure why:
Assertion failure in -[UITableView _configureCellForDisplay:forIndexPath:], /SourceCache/UIKit_Sim/UIKit-3318.16.14/UITableView.m:7344
I've added a UITableViewController
in my storyboard and I'm using the prototype cells to design the cell. I linked the cell to my custom UITableViewCell
subclass and I set its reuse identifier to "Cell". I am getting the assertion failure when I call dequeueReusableCellWithIdentifier
in cellForRowAtIndexPath
. From what I've read, this happens when I don't set the reuse identifier in the prototype cell, however I've checked countless times and it's the same identifier I'm using when I dequeue it.
Here are my datasource methods In the UITableViewController
subclass:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return 2;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
LanguageSelectionTableViewCell *cell = (LanguageSelectionTableViewCell*)[self.tableView dequeueReusableCellWithIdentifier:@"Cell"];
return cell;
}