コード例 #1
0
    public void FromData()
    {
        var source = NSData.FromArray(new byte[] { 0 });
        var data   = NSData.FromData(source);

        Assert.AreNotEqual(IntPtr.Zero, data.Handle);
    }
コード例 #2
0
        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();
            }
        }