ios - UIImage loaded from URL in Xamarin / C# -
it has been 4 years since this question has been answered this blog post.
is there standard way create uiimage image url? like:
uiimage image = uiimage.fromfile("http://foo.com/bar.jpg");
i feel i'm missing simple.
not one-liner, few lines can roll own. e.g.
static uiimage fromurl (string uri) { using (var url = new nsurl (uri)) using (var data = nsdata.fromurl (url)) return uiimage.loadfromdata (data); }
the calls, including 1 uiimage
, thread-safe.
Comments
Post a Comment