且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ALAssetsLibrary 图像扭曲

更新时间:2023-11-18 09:44:28

您必须将您的方法编辑为

You have to edit your method as

if (iref) {

  dispatch_async(dispatch_get_main_queue(), ^{

       cell.image.image =  [UIImage imageWithCGImage:iref scale:[rep scale] orientation:(UIImageOrientation)[rep orientation]];
  });
}

以上代码将检索具有捕获/原始方向的资产图像.

This above code will retrieve the asset images with their captured/original orientation.

您必须更新主线程上的用户界面以获得更好的性能.所以你必须使用任何一个

You have to update the user interface on main thread for better performance. So you have to use either

dispatch_async(dispatch_get_main_queue()

performSelectorOnMainThread