BLImageCache *sharedImageCache = [BLImageCache sharedInstance];
NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:indexPath ,@"IndexPath", nil] ;
NSString *urlString;
urlString = [[mNewsArray objectAtIndex:indexPath.row] objectForKey:@"imgUrl"];
urlString =[urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
UIImage *image=[sharedImageCache imageForURL:urlString];
if(image==nil)
{
urlString = [urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[sharedImageCache loadImageFromURL:[NSURL URLWithString:urlString] sender:self context:(NSDictionary*)dictionary];
}
else{
cell.imageView.image =image;
cell.imageView.contentMode = UIViewContentModeScaleAspectFit;
}
The Application is crashing can Anyone tell me what I am doing wrong is there any Memory related Issue...
-(void)didLoadImage:(UIImage *)inImage contextInfo:(void *)inContext
{
if(inImage )
{
NSIndexPath *indexPath= [(id)inContext objectForKey:@"IndexPath"];
UITableViewCell *cell=[mTableView cellForRowAtIndexPath:indexPath];
inImage=[inImage resizeImagewithwidth:69 height:67];
cell.imageView.image=inImage;
}
}