Taking time to load the image from URL to UIImageview

后端 未结 3 1005
死守一世寂寞
死守一世寂寞 2020-12-20 05:43

I am using this code for displaying the image from URL to UIImageview

UIImageView *myview=[[UIImageView alloc]init];

myview.frame = CGRectMake(50, 50, 320,         


        
3条回答
  •  无人及你
    2020-12-20 06:36

    Instead of dispatch_async, Use SDWebImage for caching the images.

    This is best I have seen...

    The problem of dispatch_async is that if you lost focus from image, it will load again. However SDWebImage, Caches the image and it wont reload again.

提交回复
热议问题