【问题标题】:Using AssetsLibrary Framework loading images too slow使用 AssetsLibrary 框架加载图像太慢
【发布时间】:2011-11-11 10:26:19
【问题描述】:

我只是使用 AssetsLibrary 框架从照片中加载图像。

[UIImage imageWithCGImage:[asset defaultRepresentation].fullScreenImage scale:1.0 orientation:(UIImageOrientation)[asset defaultRepresentation].orientation];

拍摄一张照片大约需要 0.5~0.6 秒。而且照片不是那么大(约700*900)。

我是否以错误的方式使用该方法?并且可以优化吗? (我要这个尺寸的照片,不要缩略图)

非常感谢!

【问题讨论】:

    标签: iphone ios photo assetslibrary


    【解决方案1】:

    您正在正确使用该方法。优化用户体验的想法:

    => 首先加载缩略图(best with dispatch_async) - 这应该很快。完成后,像上面一样加载全屏图像。

    这就是苹果在 Photo App 中为提供流畅的用户体验所做的事情。

    干杯,

    亨德里克

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-11-20
      • 2021-04-19
      • 1970-01-01
      • 2011-03-29
      • 2020-02-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多