0
im с использованием данных ядра У меня есть объект, называемый вопросами всякий раз, когда я добавляю свой вопрос в свою таблицу, я хочу, чтобы они отображали номер вопроса (вроде как функция автоматического приращения) can кто-нибудь пожалуйста, помогите мне спасибоЯ хочу, чтобы номера моих строк в UITableView
вот мой код, если его соответствующим
- (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;
}
спасибо много он работал !!!! – newstar7867