Very similar to this question (and also this answer), I'm trying to make an UIImage out from a webview. So far I'm using the code suggested in the answer, specifically:
UIGraphicsBeginImageContext(webview.bounds.size);
[webview.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
However, when the contents of the webview are larger than the screen, the resulting images are not complete and have missing patches. Any ideas on how to fix this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…