手动截图

    if(UIGraphicsBeginImageContextWithOptions != NULL)

    {

        UIGraphicsBeginImageContextWithOptions(_view.frame.size, NO, 0.0);

    } else {

        UIGraphicsBeginImageContext(_view.frame.size);

    }

    [_view.layerrenderInContext:UIGraphicsGetCurrentContext()];

    UIImage *cropImage = UIGraphicsGetImageFromCurrentImageContext();

    UIGraphicsEndImageContext();
cropImage就是截下来的UIImage,将其写入本地
posted @ 2013-10-17 14:31  小白猪jianjian  阅读(312)  评论(0)    收藏  举报