データベースには画像パスのリストがあり、パスは次のようになります。
assets-library://asset/asset.JPG?id=94473FB8-A6CE-4775-9C57-B8350B335E2B&ext=JPG
私はそのパスを取り、それに画像をロードしようとしています。しかし、graphImage は nil を返し、画像パスは nil ではありません。
パスを含む画像をセルの UIImageView にロードするにはどうすればよいですか?
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath;
{
NSString *imagePath = [array_photos objectAtIndex:[indexPath row]];
UIImage *graphImage = [[UIImage alloc] initWithContentsOfFile: imagePath];
cell.photoImageView.image = graphImage;
}