I have a View in iOS app where multiple wkwebview are added as subviews to render html contents. It shows all the content but when I try to take screen shot, it shows blank as if content is never rendered in wkwebviews.
code I used to take screenshot:
 //view is parent view which contains wkwebviews as childviews
 func takeScreenShot(view: UIView) -> UIImage{
    UIGraphicsBeginImageContext(view.bounds.size)
    view.layer.renderInContext(UIGraphicsGetCurrentContext()!)
    let image = UIGraphicsGetImageFromCurrentImageContext()
    UIGraphicsEndImageContext()
    return image
}
When I check the UI Hierarchy, the content of wkwebviews are actually out of bound of the parent view. Is there proper way to take screenshot?