Ios9, ALAsset.thumbnail.size - {75.75}?

In iOS 9, I selected a photo from an album. Having received ALASset, I called "thumbnail" to get a thumbnail and display it, but the photos are blurry.

In iOS 8, the size of ALAsset.thumbnail is 150 * 150 , but in iOS 9 its 75 * 75

This is my code:

 self.image = [UIImage imageWithCGImage:self.asset.thumbnail]; //self.image.size is 75*75 in ios9 //self.image.size is 150*150 in ios8 

How can I solve this problem?

If I use:

 [self.asset defaultRepresentation] fullScreenImage] 

Then I get poor performance.

+7
ios objective-c alasset
source share
2 answers

I also had this problem and it was solved using asset.aspectRatioThumbnail

  UIImageView *imageView; [imageView setImage:[UIImage imageWithCGImage:[asset aspectRatioThumbnail]]]; [imageView setContentMode:UIViewContentModeScaleAspectFill]; 
+13
source share

I meet this problem. ALAsset, available in iOS 4.0 and later, is deprecated in iOS 9.0. You can use PHAsset instead in iOS9.

0
source share

All Articles