更新时间:2023-02-23 19:39:38
不是单行的,但您可以自己滚动几行.例如
Not a one-liner, but with very few lines you can roll your own. E.g.
static UIImage FromUrl (string uri)
{
using (var url = new NSUrl (uri))
using (var data = NSData.FromUrl (url))
return UIImage.LoadFromData (data);
}
调用,包括来自 UIImage
的调用,都是线程安全的.
The calls, including the one from UIImage
, are thread-safe.