(のUITableViewCell *)のtableView:(のUITableView *)のtableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {テーブルビュー画像負荷問題(のTableCell FOTフルコード)
辞書= [QuestionMutableArray objectAtIndex:0]。
静的NSString * CellIdentifier = @ "BeginingCell";
BeginingCell * cell =(BeginingCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
(セル== NIL){
NSArray *topLevelObjects=[[NSBundle mainBundle] loadNibNamed:@"BeginingCell" owner:self options:nil ]; for(id CurrentObject in topLevelObjects) { if ([CurrentObject isKindOfClass:[BeginingCell class]]) { cell=(BeginingCell *) CurrentObject; break; } }
}
//セルを設定する場合。
(indexPath.row == 0){
cell.SectionTitle.text=[dictionary objectForKey:@"question"]; cell.Option1.text=[dictionary objectForKey:@"option1"]; cell.Option2.text=[dictionary objectForKey:@"option2"]; cell.Option3.text=[dictionary objectForKey:@"option3"]; cell.Option4.text=[dictionary objectForKey:@"option4"]; UIImage *imgDef=[UIImage imageNamed:@"man_kirstie_alley.jpg"]; [cell.myImageView setImage:imgDef]; [MyTestArray release]; [cell.button1 setTitle:@"A." forState:UIControlStateNormal]; [cell.button2 setTitle:@"B." forState:UIControlStateNormal]; [cell.button3 setTitle:@"C." forState:UIControlStateNormal]; [cell.button4 setTitle:@"D." forState:UIControlStateNormal];
}
戻りセルであれば、
}
これは、「cellForRowAtIndexPath」の完全なコードですか? "cellForRowAtIndexPath"メソッドで完全なコードを投稿してください。 – Saurabh
詳細を提供する必要がありますか、エラーメッセージはありますか?どのコード行がエラーを投げていますか? – JFoulkes