【发布时间】:2015-02-12 08:09:14
【问题描述】:
我正在学习如何使用笔尖,一般是新手。
我有一个表视图和另一个视图,我在其中创建对象来填充此表视图。我也在使用核心数据。
我的表格视图没有被填充...这是我的 cellForRowAtIndexPath:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *cellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier forIndexPath:indexPath];
Target *target = [self.fetchedResultController objectAtIndexPath:indexPath];
cell.textLabel.font = [UIFont fontWithName:@"Candara-Bold" size:20];
cell.textLabel.text = target.body;
// Configure the cell...
return cell;
}
这是我的笔尖:
很想在这里得到帮助...谢谢!!
【问题讨论】:
-
您的代码看起来不错,但没有足够的信息进行故障排除。你实现了 numberOfRowsInSection 吗? cellForRowAtIndexPath 甚至被调用了吗?
标签: ios objective-c iphone uitableview core-data