이전 질문과 관련된 here. UIImage에 파일 경로에서 자산 라이브러리로 이미지로드
나는 예를 들어, 자산 라이브러리의 이미지에 대한 경로가 : 이제assets-library://asset/asset.JPG?id=1000000001&ext=JPG
, 어떻게 내가있는 UIImage 객체에이 경로에서 이미지를로드 할 수 있을까?
NSString *path = [occasion imagePath];
//temp
NSLog(@"the 2nd occasion imagePath is: %@", path);
//end
if (path != nil)
{
//UIImage *image = [UIImage imageNamed:path];
UIImage *image = [UIImage imageWithContentsOfFile:path];
image = [image imageByScalingAndCroppingForSize:CGSizeMake(36.0, 42.0)];
[[cell imageView] setImage:image];
}