public void FromData() { var source = NSData.FromArray(new byte[] { 0 }); var data = NSData.FromData(source); Assert.AreNotEqual(IntPtr.Zero, data.Handle); }
public void Kaydet() { try { TaskCompletionSource <bool> taskCompletionSource = new TaskCompletionSource <bool>(); var data = Image.AsJPEG(); NSData nsdata = NSData.FromData(data); UIImage image = new UIImage(nsdata); image.SaveToPhotosAlbum((UIImage img, NSError error) => { taskCompletionSource.SetResult(error == null); }); } catch (Exception e) { string hata = e.Message.ToString(); } }