안녕하세요,문서 디렉토리의 하위 디렉토리에서 이미지가로드되지 않습니다.
문서 디렉토리의 하위 디렉토리에서 이미지를로드 중입니다. 여기에 코드가 있습니다.
NSArray *documentPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDir = [documentPaths objectAtIndex:0];
cell.imageView.image = [UIImage imageWithContentsOfFile:[documentsDir stringByAppendingPathComponent:[NSString stringWithFormat:@"images/category/%@", element.image]]];
내 이미지가 DocumentDir에있는/이미지/카테고리/img1.png, DocumentDir/이미지/카테고리/img2.png, DocumentDir/이미지/카테고리/img3.png .....
그러나 이미지가 DocumentDir에있을 때 잘로드됩니다. 그러나 위와 같은 하위 디렉토리에있을 때로드되지 않습니다. 내가 여기서 잘못하고있는거야?
감사합니다
어떻게이 문제를 싫어 했습니까? – NIKHIL
내 질문 코드와 같습니다. 거기에 잘못된 가치를 사용했습니다. 그 코드가 작동합니다. – Dilshan