I am trying to display a thumbnail for an image or video that my application is taking. It works great for video, but for the image it just doesn't show anything. This is the code I used:
[assetImageView setImage:[UIImage imageWithCGImage:[asset thumbnail]]]
I also tried this as an alternative, but also nothing:
ALAssetRepresentation *assetRepresentation = [asset defaultRepresentation]; UIImage *image = [UIImage imageWithCGImage:[assetRepresentation fullScreenImage]]; [assetImageView setImage:image];
Any ideas what could happen?
source share