Closed pawelkata closed 12 years ago
Ok, I worked it out by myself. Just had to edit two methods in FGalleryPhoto.m:
(void)loadFullsizeInThread { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
//NSString path = [NSString stringWithFormat:@"%@/%@", [[NSBundle mainBundle] bundlePath], _fullsizeUrl]; NSString path = [NSString stringWithFormat:@"%@", _fullsizeUrl]; _fullsize = [[UIImage imageWithContentsOfFile:path] retain];
_hasFullsizeLoaded = YES; _isFullsizeLoading = NO;
[self performSelectorOnMainThread:@selector(didLoadFullsize) withObject:nil waitUntilDone:YES];
[pool release]; }
(void)loadThumbnailInThread { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
//NSString path = [NSString stringWithFormat:@"%@/%@", [[NSBundle mainBundle] bundlePath], _thumbUrl]; NSString path = [NSString stringWithFormat:@"%@", _thumbUrl]; _thumbnail = [[UIImage imageWithContentsOfFile:path] retain];
_hasThumbLoaded = YES; _isThumbLoading = NO;
[self performSelectorOnMainThread:@selector(didLoadThumbnail) withObject:nil waitUntilDone:YES];
[pool release]; }
Thanks a lot :D
It is not working for me..The above method can not load images from document directory.
This was fixed in issue #36. Please let me know if you have more issues.
Hello,
I've been trying tou use FGallery (nice lib, btw) with some jpegs from my local app Documents directory, but no cigar.
Photo source array includes all paths for images, but they just don't show up, when i'm pushing the gallery in the stack.
Any suggestions on how to make it work with local Documents folder?
Cheers!
Pawel