2011-05-24 136 views

回答

0

你可以在MonoTouch的,只是把屏幕拍攝:

public class ScreenShot 
{ 
    public static UIImage TakeScreenShot (UIView view) 
    { 
     RectangleF canvasRect = view.Bounds; 
     UIGraphics.BeginImageContext (canvasRect.Size); 

     CGContext ctx = UIGraphics.GetCurrentContext(); 
     ctx.FillRect (canvasRect); 
     view.Layer.RenderInContext (ctx); 

     UIImage newImage = UIGraphics.GetImageFromCurrentImageContext(); 

     UIGraphics.EndImageContext(); 

     return newImage; 
    } 
}