use*_*381 0 iphone cgpdfdocument ipad ios5
我正在尝试在CGPDFDocument中加载拇指图像我在类"ReaderThumbFetch"中的一个名为"main"的函数中编写了以下代码
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
}
Run Code Online (Sandbox Code Playgroud)
并且"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
}
Run Code Online (Sandbox Code Playgroud)
但是当我跑它时,它给了我:
Undefined symbols for architecture i386:
"_CGImageSourceCreateWithURL", referenced from:
-[ReaderThumbFetch main] in ReaderThumbFetch.o
Run Code Online (Sandbox Code Playgroud)
任何帮助?提前致谢.
| 归档时间: |
|
| 查看次数: |
772 次 |
| 最近记录: |