Hi guy,
I want to create an UIImage of UIWebView and then I want to draw that image.
Here is my code:
UIView *tempView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 768, 1004)];
tempView.backgroundColor = [UIColor blueColor];
UIGraphicsBeginImageContext(tempView.bounds.size);
[tempView drawRect:tempView.bounds];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
CGRect imageRect = CGRectMake(0, 0, image.size.width, image.size.height);
CGContextDrawImage(ctx, imageRect, [image CGImage]);
but its not drawing anything other than a blank page. Cant we create UIImage like that or Am I doing something wrong somewhere in the code.
Thanx