ここにあるように、通常のデータ読み込みを実行してtableview
いますcellForRowAtIndexPath
。StopAndCheckQuestions は、コア データから生成されたクラスです。
データの読み込み方法
- (void)viewDidLoad
{
[super viewDidLoad];
CoreDataHelper * helper = [CoreDataHelper getCDHelper];
FirstQuestions =[helper fetchEntitiesForClass:[StopAndCheckQuestions class] withPredicate:nil];
}
static NSString *CellIdentifier = @"FirstQuestionCell";
QuestionCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell ==nil) {
cell = [[QuestionCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
StopAndCheckQuestions *questions = [FirstQuestions objectAtIndex:indexPath.row];
cell.lblQuestion.text = questions.question;
return cell;
特にない。しかし今、に依存するデータをロードしたいのですが、これは、 titleId) が 1foreign key
であるすべてのデータが必要であることを意味します。foreign key(
誰かが私を助けて、おそらくサンプルか何かを提供してくれませんか
助けてくれてありがとう!