I'm using this method to assign a YouTube video thumbnail to an image view in a custom collection cell view:
[cell.imageView sd_setImageWithURL:[NSURL URLWithString:youtubeImageString]
placeholderImage:nil
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
if (cacheType != SDImageCacheTypeMemory)
{
cell.imageView.alpha = 0.0;
double val = ((double)arc4random()/ARC4RANDOM_MAX)*0.8;
[UIView animateWithDuration:0.2 delay:val options:UIViewAnimationOptionCurveEaseInOut animations:^{
cell.imageView.alpha = 1.0;
} completion:nil];
}
}];
When I build and run my application, I'll get an empty cell. I have debugged the code with break points, and the URL is correct and the JSON data is there, but the images are not showing.