When the interface of wkwebview exists in xcode26beta5 and one wants to take a screenshot of the wkwebview interface, the image rendered by UIGraphicsImageRenderer is blank, but this is normal in xcode26beta4
Could you try using takeSnapshot(with:completionHandler:)
If you want to generate an image of the web view’s content.
将 [view.layer renderInContext:ctx];self.contentView.drawHierarchy(in: CGRect(origin: .zero, size: imageSize), afterScreenUpdates: true) 即可正常截图
将 [view.layer renderInContext:ctx];更换为self.contentView.drawHierarchy(in: CGRect(origin: .zero, size: imageSize), afterScreenUpdates: true) 即可正常截图