guys, this is my code:
- (void) renderPageAtIndex:(NSUInteger)index inContext:(CGContextRef)ctx {
//background
CGContextSetFillColorWithColor(ctx, [[
You can just set the scale when you start the context
+ (UIImage *)imageWithView:(UIView *)view {
UIGraphicsBeginImageContextWithOptions([view bounds].size, NO, [[UIScreen mainScreen] scale]);
[[view layer] renderInContext:UIGraphicsGetCurrentContext()];
UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return result;
}