I have placed one label on view and view\'s frame is CGRectMake(0,0,270,203). Now I have to take screen shot of view with CGRectMake(0,0,800,600)
+(UIImage*)screenShotOf:(UIView*)view atScale:(CGFloat)scale
{
UIGraphicsBeginImageContextWithOptions(view.bounds.size, view.opaque, scale);
[view.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage * img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return img;
}
Here You need to adjust the scale property as you needed.