HJCache class issue
Good morning..
This is my issue.I am using HJCache ios library to asynchronously load images from the URL.I was successful when i used this in loading the images in the tableview.But when i used the same to load the images in a scroll view in a landscape orientation,certain images failed to load thats is 开发者_如何学Goif there are 5 images.Image 1 gets loaded,image 2 doesn't gets loaded,image 3 gets loaded..etc.,The second image always fails to download and other images failed to load randomly.
When an image fails to download,I get this error
moHandlerFailed HJMOHandler http://www.greendioxide.com/wp-content/uploads/2007/08/tree1.jpg users:1 retains:4
the url is a sample URL,if i copy the url which comes in the real scenario in the error and paste it in the browser it shows me the image
the error i get from this method.
-(void) managedObjFailed {
NSLog(@"moHandlerFailed %@",moHandler);
[image release];
image = nil;
}
I am using the HJCache classes in two places one in loading the images in the table view and when viewing the images in the scroll view in the landscape orientation.
Please help me to over come from this problem i am suffering with this for the past 5 days.I am using this link https://github.com/markofjohnson/HJCache/commits/master which contains the revisions and bug fixes to correct the issue,but i am very unfortunate.Please anybody help me.
Thank you one and all.
I found the solution to this problem.We should not create two file caches,when you are trying to load images asynchronously at two places of the application and if you use HJCache class,please make sure that you create file cache only in application
- (void) applicationDidFinishLaunching: (UIApplication *)application
method.
Thank you one and al
精彩评论