-3
我已经创建了一个coreData应用,我救了我的NSString的使用添加的NSString特别UITableViewCells
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"Cell" forIndexPath:indexPath];
Person *person = [self.fetchedResultsController objectAtIndexPath:indexPath];
cell.textLabel.text = [NSString stringWithFormat:@"%@",person.personType];
return cell;
}
在一个UITableView显示他们,我想使它所以这些结果开始后10的UITableView显示细胞,并在前10个细胞中,我只是添加一个预设的NSString,将永远是相同的?任何帮助将很大
In person * person = [self.fetchedResultsController objectAtIndexPath:indexPath - 10]; “-10”似乎不起作用? – burrGGG
为什么不呢?请详细说明。 – rmaddy
它打破了,说'不兼容的整数指向int类型的指针转换发送到NSIndexpath'。难道是因为numberOfRowsInSection增加了10?这就是我在numberOfRowsInSection id secInfo = [[self.fetchedResultsController sections] objectAtIndex:section]; return [secInfo numberOfObjects] + 10; –
burrGGG