Pergunta

Eu estou tentando carregar imagens polegar em CGPDFDocument Eu escrevi o seguinte código em uma função chamada "main" na classe "ReaderThumbFetch"

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
}

e a implementação de "thumbFileURL" função é:

- (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
}

mas quando executo ele me dá que:

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

alguma ajuda ??Graças, em avançado.

Foi útil?

Solução

adicione o quadro ImageIOFramework.No xcode é feito no projeto guia de configuração:criar fases->link binários com bibliotecas

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top