あなたのモデルから管理対象オブジェクトをフェッチし、配列は以下のように写真の名前が含まれます配列にそれを置くことができます。 cellForRowAtIndexPathの内側に追加するには、イメージ名を使用し、コードは今
NSFetchRequest *fetchRequest=[[[NSFetchRequest alloc] init] autorelease];
NSEntityDescription *entity=[NSEntityDesription entityForName:@"photoStore" inManagedObjectContext:self.managedObjectContext];
[fetchRequest setEntity : entity];
NSArray fecthedObject = [fetchRequest executeFetchRequest:fetchRequest error:nil];
for(NSManagedOect *photos in fetchedObect)
{
[self.arrayOfImageNames addObject : [photos valueForKey :@nameOfPhoto"]];
}
、次のようになりますので、私は、あなたのエンティティがphotoStoreとnameOfPhotoなる写真ファイル名を格納する列にすると仮定しています
NSString *imagePath = [NSHomeDirectory() stringByAppendingString : [[self.arrayOfImageNames objectAtIndex:indexpath.row] stringByAppendingPathComponent:"jpg"]];
cell.imageView.image=[UIImage imageNamed:imagePath];
、としてあなたのセルのImageViewのに画像これは、あなたがコアデータにストアに画像名を追加し、それへのパスを構築し、それを表示名を取得する方法をです。
私はコアデータからイメージを取得し、それをUITableViewCellに配置したいと考えています。 –