How to take PRINT of content from UIWebView?
问题 I am using swift, i need to take print of a sheet which is opened in UIWebView. let url = webView.request?.url let stringurl = url?.absoluteString let pic = UIPrintInteractionController.shared let printInfo : UIPrintInfo = UIPrintInfo(dictionary: nil) printInfo.outputType = UIPrintInfoOutputType.general printInfo.jobName = stringurl! pic.printInfo = printInfo pic.printFormatter = webView.viewPrintFormatter() pic.showsPageRange = false pic.present(animated: true, completionHandler: nil) 回答1: