Create a UIImage with a URL in iOS

前端 未结 3 449
無奈伤痛
無奈伤痛 2020-12-04 10:29

To create an UiImage with a image file, I use the code as below:

UIImage *aImage = [[UIImage imageNamed:@\"demo.jpg\"]autorelease];

If I wa

3条回答
  •  眼角桃花
    2020-12-04 10:41

    For anyone looking to load image from the web the following library may be helpful:

    https://github.com/rs/SDWebImage

    It's a UIImageView category which handles async loading and image caching from url.

提交回复
热议问题