How to take screenshot and send to a email with a button ? I have did the coding for taking screenshot, but it will saved to photo album.
partial void btnScreenshot (NSObject sender)
{
UIImage image;
UIGraphics.BeginImageContext (View.Frame.Size);
//new iOS 7 method to snapshot
View.DrawViewHierarchy (View.Frame, true);
image = UIGraphics.GetImageFromCurrentImageContext ();
UIGraphics.EndImageContext ();
//...code to save to photo album omitted for brevity
image.SaveToPhotosAlbum((img, err) => {
if(err != null)
Console.WriteLine("error saving image: {0}", err);
else
Console.WriteLine ("image saved to photo album");
UIAlertView alert = new UIAlertView("Screenshot", "Image saved successfully", alertDelegate, "OK", null);
alert.Show();
alert.Show();
});
}