当我们运行下面提到的代码下载图片并将其保存在照片库中时,它会在 ios 11 中自动崩溃。请指导解决这个问题。
try
{
string uri = "https://www.xamarin.com/content/images/pages/branding/assets/xamagon.png";
using (var url = new NSUrl(uri))
using (var data = NSData.FromUrl(url))
UIImage.LoadFromData(data).SaveToPhotosAlbum((image, error) =>
{
var o = image as UIImage;
Console.WriteLine("error:" + error);
});
}
catch(Exception exx)
{
throw exx;
}
相关分类