2012-07-26 1 views
0

내가 CGPDFDocument 에 엄지 손가락 이미지를로드하기 위해 노력하고있어 나는 "기본"클래스 "ReaderThumbFetch"cgimagesourcecreatewithurl는 PDF

NSURL *thumbURL = [self thumbFileURL]; 

CGImageRef imageRef = NULL; 

CGImageSourceRef loadRef = CGImageSourceCreateWithURL((CFURLRef)thumbURL, NULL); 

if (loadRef != NULL) // Load the existing thumb image 
{ 
    imageRef = CGImageSourceCreateImageAtIndex(loadRef, 0, NULL); // Load it 

    CFRelease(loadRef); // Release CGImageSource reference 
} 

라는 함수에 다음 코드와 "thumbFileURL"기능이 구현을 썼다 :

- (NSURL *)thumbFileURL 
{ 
#ifdef DEBUGX 
NSLog(@"%s", __FUNCTION__); 
#endif 

NSString *cachePath = [ReaderThumbCache thumbCachePathForGUID:request.guid]; // Thumb cache path 

NSString *fileName = [NSString stringWithFormat:@"%@.png", request.thumbName]; // Thumb file name 

return [NSURL fileURLWithPath:[cachePath stringByAppendingPathComponent:fileName]]; // File URL 
} 

내가 실행할 때하지만 나를 준다 :

Undefined symbols for architecture i386: 
"_CGImageSourceCreateWithURL", referenced from: 
-[ReaderThumbFetch main] in ReaderThumbFetch.o 

어떤 도움 ?? 고맙습니다.

답변

5

프레임 워크 ImageIOFramework를 추가하십시오. xcode에서는 프로젝트 설정 탭에서 다음을 수행합니다. 빌드 단계 -> 라이브러리와 링크 바이너리

+0

도움 주셔서 감사합니다. :) – user1553381