If I understand correctly, in my TableView, I can’t use
if (cell == nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1];
}
if I declare the ReuseIdentifier in the Storyboard.
That’s why I would like to declare the identifier in a class. But I can’t figure out how to do that.
I tried with this :
[self.tableView registerClass:[UITableViewCell class] forCellWithReuseIdentifier:@"carTableCell"];
But it tells me that
No visible @interface for ‘UITableView’ declares the selector ‘registerClass:forCellWithReuseIdentifier.’
The actual method name is
registerClass:forCellReuseIdentifier:— no “With”.