2011-05-24 6 views

Répondre

0

Vous pouvez, à MonoTouch, prenez un écran tir:

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; 
    } 
} 
Questions connexes