How to retrieve images from server asynchronously

后端 未结 5 2025
难免孤独
难免孤独 2021-01-14 06:03

i have one NSMutableArray with some image url\'s. The images have sizes between 12KB to 6MB. I use AsycImageView class and implement but when large

5条回答
  •  不知归路
    2021-01-14 06:33

    You're problem seems to be more of a memory usage issue than it is a performance issue.

    If you really want to download image asynchronously I would recommend you use The UIImageView category from AFNetworking which has been fully tested and is very well maintained.

    However here you run into memory warnings on your device (which obviously holds much less memory than your simulator which runs on your Mac).

    So I would use first the static analyzer:

    enter image description here

    to see if leaks are present and then run a Leaks Instrument to track it down.

    Hope this helps.

提交回复
热议问题