Possible ways to speed up reading from ALAssetsLibrary and populating a UITableView

落花浮王杯 提交于 2019-12-03 23:10:29

Just enumerate the assets you currently need to display by using enumerateAssetsAtIndexes:(NSIndexSet *)indexSet options:(NSEnumerationOptions)options usingBlock:(ALAssetsGroupEnumerationResultsBlock)enumerationBlock of your asset group and not by using - (void)enumerateAssetsUsingBlock:(ALAssetsGroupEnumerationResultsBlock)enumerationBlock

you could (i suppose you want to fill a table view) for example just enumerate the asset at the index indexPath.row in your tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath method.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!