从指定的view中截图 返回UIImage

-(UIImage *)getImageFromView:(UIView *)view{

    UIGraphicsBeginImageContext(view.bounds.size);

    [view.layerrenderInContext:UIGraphicsGetCurrentContext()];

    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();

    UIGraphicsEndImageContext();

    return image;

}

posted on 2014-01-15 10:30  IOS开发者  阅读(199)  评论(0编辑  收藏  举报