UIImage loaded from URL in Xamarin / C#

前端 未结 5 997
情歌与酒
情歌与酒 2021-02-01 17:07

It has been 4 years since this question has been answered with this blog post.

Is there a standard way to create a UIImage with an image from a URL? Something like:

5条回答
  •  暖寄归人
    2021-02-01 17:39

    You want to be sure that you load the image async so that you do not block your UI thread. MonoTouch.Dialog includes an ImageLoader (see sec 5.3) class that you could use.

    There are also a couple of variations of UrlImageStore out there to help with async loading images.

    Finally, if you want to do it manually, there is a Xamarin Recipe you can use.

提交回复
热议问题