I know there are many questions about this theme but I really read all of them but not found an answer.
I want make a screenshot from the current table view. and i do it this way:
-(UIImage *)imageFromCurrentView
{
UIGraphicsBeginImageContextWithOptions(self.tableView.bounds.size, YES, 1);
[self.tableView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *img = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return img;
}
Everything works fine, but when i scroll down in the tableview and make the screenshot, half of the image is black. I don't know how to make the screenshot from the actual tableview area.