データをcoreDataに保存して、テーブルに表示しています。私は3つのエンティティを持っています:
EntitySet <------>> EntityRow <------>> EntityDetails
(多数のリレーションシップへ)
テーブル、セクション、および行のデータを読み取って表示している間、正常に動作します。しかし、問題は、EntityRow のすべてのデータがすべてのセクションに表示されることですが、セクション X に属する行のみを表示したいということです。
ここで何が間違っている可能性がありますか? この問題を解決する方法がわかりません。私の tableView:cellForRowAtIndexPath: メソッドでは、次のようになります。
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
EntityRows *rows = [_rowsX objectAtIndex:indexPath.row];
cell.textLabel.text = rows.title;
return cell;
}
または、coreData の私の間違いでしょうか? 間違った関係?
助けてくれてありがとう、brush51