-(UIImage *)saveImage:(UIView *)view {
CGRect mainRect = [[UIScreen mainScreen] bounds];
UIGraphicsBeginImageContext(CGSizeMake(320, 200));
CGContextRef context = UIGraphicsGetCurrentContext();
// [[UIColor blackColor] set];
CGContextFillRect(context, mainRect);
[view.layer renderInContext:context];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return newImage;
CGRect mainRect = [[UIScreen mainScreen] bounds];
UIGraphicsBeginImageContext(CGSizeMake(320, 200));
CGContextRef context = UIGraphicsGetCurrentContext();
// [[UIColor blackColor] set];
CGContextFillRect(context, mainRect);
[view.layer renderInContext:context];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return newImage;
}