Моя работа посвящена `UITableView. Каждый раз, когда я запускаю свой проект, появляется эта ошибка:
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'unable to dequeue a cell with identifier Cell1 - must register a nib or a class for the identifier or connect a prototype cell in a storyboard
Я проверил сто раз мой идентификатор ячейки в своем раскадровке, и в моем коде все одинаково.
Код (код defaut из UITableViewController
):
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell1";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];
// Configure the cell...
return cell;
}
Изображение таблицы Вид Свойства ячейки:
Я создал и реализовал подкласс UITableViewCell
для моей ячейки.
Любая идея, почему это не работает?
В любом случае (строка кода) узнать, что является идентификатором ячейки?
Спасибо
Изменить: Снимок экрана моего конструктора интерфейса.
Изменить 2: Текст customCell.h
#import <UIKit/UIKit.h>
@interface customCell : UITableViewCell
@end
При запуске проекта появляется новая ошибка:
[<choixActiviteViewController 0x7591ac0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key Cell1.
choixActiviteViewController является подклассом UITableViewController и является настраиваемым классом контроллера Choix Activite View.