iOS 5 ARC lazy image loading library

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 05:32:37

问题


Is there an iOS 5 arc compatible lazy Image loading library? I've not found one.

My next thought is to make EGOlazyloading a compiled library and link it to my project. Would that work? Any pointers on going about?

Thanks!


回答1:


I wrote one. You can download it here:

https://github.com/nicklockwood/AsyncImageView

Alternatively, if you do want to use EGO, or some other library, select Edit>Refactor>Convert to ARC and in the dialog that comes up there's a little drop down to select which files to convert.

Just tick the files that should be converted to ARC and un-tick ones which shouldn't be. If a file is already using ARC then leave it ticked (it won't double convert it).

That gives you the option of either trying to convert the library files to ARC or to leave them alone. Files that are unticked will be marked with the -fno-objc-arc flag automatically so you won't have to do anything.




回答2:


Byron, you could just use a regular library like EGOlazyloading you suggested and order the compiler not to use ARC on those specific files by adding the flag -fno-objc-arc in "Build Phases -> Compile Sources"



来源:https://stackoverflow.com/questions/9150275/ios-5-arc-lazy-image-loading-library

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