я использую базовые данные. У меня есть объект, называемый вопросами, всякий раз, когда я добавляю свой вопрос в свою таблицу, я хочу, чтобы он отображал номер вопроса (вроде автоматического увеличения), может кто-нибудь, пожалуйста, поможет мне, спасибо
вот мой код, если он уместен
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
// Return the number of sections.
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// Return the number of rows in the section.
return [self.questionArray count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
// Configure the cell...
questionObject = [self.questionArray objectAtIndex:indexPath.row];
cell.textLabel.text = questionObject.questionDescription;
return cell;
}