What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Short answer: UIKit does not document a supported one-call method that turns a legacy UIWebView into a bitmap of its entire scrollable HTML document. UIWebView is deprecated, and Apple says to use WKWebView instead. The documented drawHierarchy(in:afterScreenUpdates:) method captures the view hierarchy “as visible onscreen,” not guaranteed offscreen web content.
If you only need what the user can currently see, capture the viewport in your IBAction with UIGraphicsImageRenderer. If you need the whole document, treat it as a rendering or export problem, migrate to WKWebView, and validate the approach against your actual HTML and deployment target rather than trusting the common “resize to contentSize and draw” recipe.
What “full UIWebView screenshot” can mean
Before writing the action, decide which artifact your feature actually needs:
- Viewport bitmap: the pixels currently visible in the web view.
- Whole-document image: one tall bitmap containing content below the current viewport.
- Document export: a PDF or other paginated representation that preserves a long document more naturally than one enormous bitmap.
These are different operations. A larger image context only allocates a larger bitmap; it does not force WebKit to lay out, load, or paint every offscreen element. Lazy images, scripts, animations, cross-origin resources, and content that appears only after scrolling make a full-document image especially dependent on the page and OS version.
Recommended Free Tools
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
| Requirement | What the documented API establishes | Practical decision |
|---|---|---|
| Current visible screen | drawHierarchy(in:afterScreenUpdates:) renders the hierarchy as visible onscreen. |
Use a viewport capture in the action. |
| All scrollable HTML in one image | No official guarantee that resizing UIWebView to scrollView.contentSize paints every offscreen pixel. |
Use a separately validated rendering/export design. |
| New or maintained app | Apple marks UIWebView deprecated and directs developers to WKWebView. |
Migrate instead of expanding a legacy workaround. |
Why the usual content-size recipe is not a guarantee
UIWebView exposes its associated UIScrollView through scrollView. That gives you scroll metrics, including contentSize, but the API reference does not promise that assigning those dimensions to an image context and drawing the view will render the complete web document.
UIKit’s hierarchy-drawing contract is deliberately narrower: it renders a snapshot of the complete view hierarchy as visible onscreen into the current context. A Boolean result can be false when image data is missing for a view. Consequently, this pattern is not a verified universal solution:
let size = webView.scrollView.contentSize
// Creating an image context of `size` does not, by itself, make
// offscreen UIWebView content render into that context.
Do not describe that snippet as a supported full-page API. If you test a legacy technique for a specific app, report the exact iOS versions, web content, and loading conditions under which it worked. There is no official guarantee here for lazy-loaded elements, animated content, or every cross-origin resource.
Capture the visible UIWebView in an IBAction
For a viewport screenshot, use the modern renderer API. UIGraphicsBeginImageContext is deprecated; UIGraphicsImageRenderer is the current choice for new code.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteSwift implementation
Connect a UIWebView outlet named webView and a button to this action. Set the web view’s delegate to the view controller and do not enable the capture button until loading has finished.
import UIKit
final class LegacyWebViewController: UIViewController, UIWebViewDelegate {
@IBOutlet private weak var webView: UIWebView!
@IBOutlet private weak var captureButton: UIButton!
override func viewDidLoad() {
super.viewDidLoad()
webView.delegate = self
captureButton.isEnabled = false
}
func webViewDidFinishLoad(_ webView: UIWebView) {
captureButton.isEnabled = true
}
func webView(_ webView: UIWebView,
didFailLoadWithError error: Error) {
captureButton.isEnabled = false
// Present an error or retry UI appropriate for your app.
}
@IBAction private func captureViewport(_ sender: UIButton) {
guard !webView.isLoading else {
return // The delegate has not reported a finished page yet.
}
webView.layoutIfNeeded()
let format = UIGraphicsImageRendererFormat()
format.scale = webView.window?.screen.scale ?? UIScreen.main.scale
let renderer = UIGraphicsImageRenderer(
size: webView.bounds.size,
format: format
)
var hierarchyRendered = false
let image = renderer.image { _ in
hierarchyRendered = webView.drawHierarchy(
in: webView.bounds,
afterScreenUpdates: true
)
}
guard hierarchyRendered else {
// Apple documents a false result when image data is missing.
presentCaptureFailure()
return
}
// Use `image` here: show it in an image view, write PNG/JPEG data,
// or pass it to the next step in your app.
handleCapturedImage(image)
}
private func presentCaptureFailure() {
// Replace with your app's alert or logging path.
}
private func handleCapturedImage(_ image: UIImage) {
// Replace with your save/share path.
}
}
This produces the web view’s current viewport, not a whole scrollable document. The renderer’s pixel dimensions follow the screen scale, so a Retina device produces a higher-resolution bitmap than a scale-1 simulator. The capture should run after the page has finished loading and after any visual changes you require have been committed.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Objective-C action shape
If the legacy project is Objective-C, the same boundaries apply: wait for webViewDidFinishLoad:, size the renderer to webView.bounds, call drawHierarchyInRect:afterScreenUpdates:, and check its Boolean return value. Do not substitute the deprecated UIGraphicsBeginImageContext merely because the project uses Objective-C.
How to approach a genuinely whole-document result
1. Migrate the web view
Apple documents WKWebView as the replacement for UIWebView, including for apps targeting iOS 8 and later. It can be created in Interface Builder or programmatically. Migration removes the deprecated control from the design, but it still does not make every long-page rasterization strategy automatically reliable.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →2. Define an export contract
Ask whether the consumer really needs a single image. A PDF or other document artifact can be a better fit for a long report, because it avoids an extremely tall bitmap and gives you pagination. If an image is mandatory, decide how you will handle page breaks, image quality, links, fonts, JavaScript-generated sections, and content that loads only after interaction.
3. Make page readiness explicit
- Wait for the web view’s load-completion callback.
- Wait for application-specific DOM content, not merely the first navigation completion, when scripts add the important content later.
- Account for lazy-loaded images and infinite-scroll sections; a page may not contain all content until it is scrolled or otherwise activated.
- Freeze or disable animations if a deterministic image matters.
- Test on every deployment target and with representative pages, including failures and offline states.
4. Rasterize only after validating the renderer
The available Apple API descriptions do not specify a guaranteed full-document UIWebView pipeline. Do not publish a resize-and-draw workaround as universally correct. If your product has a narrow, controlled HTML template, validate your chosen export or rendering method on that exact template and document its limits.
Common failure modes and fixes
The image contains only the visible area
Cause: You used a viewport hierarchy-drawing API; its documented scope is what is visible onscreen.
Fix: Keep it for viewport capture. For a whole document, redesign around a validated export/render path or migrate to WKWebView; increasing the bitmap height alone is not evidence of correctness.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
The screenshot is blank or partly missing
Cause: The page is still loading, a view has not produced image data, or dynamic resources have not arrived.
Fix: Gate the action on the load delegate, call layoutIfNeeded(), use afterScreenUpdates: true, and handle a false return from drawHierarchy. Add page-specific readiness checks for script-generated content.
The capture button works intermittently
Cause: The action races navigation, layout, or an animation.
Fix: Disable the button during navigation, re-enable it from the completion delegate, and capture only after the required visual state has been applied.
The app becomes slow or runs out of memory
Cause: A full-length bitmap can be very large, especially at Retina scale.
Fix: Prefer a document artifact for long content, capture the viewport, reduce the required output dimensions, or process pages/sections separately if your validated design permits it. Never assume that one giant image is the cheapest or most stable representation.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Touch handling is unreliable
Cause: Apple warns against embedding UIWebView inside another UIScrollView; touch events can be mixed up and handled incorrectly.
Fix: Remove the nested-scroll arrangement where possible and use the web view’s own scrolling behavior.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minutePerformance and reliability checklist
- Capture only after the page and layout are ready.
- Use
UIGraphicsImageRendererfor new bitmap code. - Check the hierarchy-drawing Boolean result.
- Keep viewport capture and whole-document export as separate features in your API and UI.
- Test dynamic, lazy-loaded, animated, and cross-origin content on the oldest supported OS.
- Record the exact content and OS conditions for any legacy workaround; do not generalize from one page.
- Plan for failure states such as navigation errors, blank pages, and missing resources.
Or skip the browser setup
If your real goal is a clean screenshot of a public web page rather than an in-app UIWebView bitmap, ScreenshotNeo provides a one-request website screenshot API. It accepts cookie and consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response reports the page verdict and billing status in X-Page-Verdict and X-Billed headers. It also offers an MCP server for AI agents, with take_screenshot, get_page_info, and capture_pdf tools.
For a full-page capture, lazy images, CSS/JavaScript, selectors, device presets, dark mode, custom headers or cookies, geolocation, transparent backgrounds, resizing, caching, signed links, asynchronous webhooks, and bulk capture are available as request options. Those controls solve website capture; they are not an API for rendering a private, in-process UIWebView instance.
See the ScreenshotNeo API documentation for request parameters. A cURL request is:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
The same request in Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
And in Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
The Free plan includes 1,000 shots per month without a card. Paid plans start at $5 for 3,000 shots; every feature is on every plan, and yearly billing provides two months free. Sign up free for ScreenshotNeo.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →FAQ
Does Apple’s iPhone “Full Page” screenshot feature provide an app API for UIWebView?
No. That is a user-facing device workflow and should not be treated as an API contract for capturing a web view from an action.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Can I guarantee that an iframe or cross-origin resource appears in the full image?
No guarantee is established for the legacy approach. Resource loading, security boundaries, lazy loading, and the target WebKit version can all affect the result, so test the exact content you ship.
Should I keep UIWebView for a new feature?
No. Keep it only for constrained legacy maintenance while planning migration; Apple’s documented replacement is WKWebView.
Frequently Asked Questions
Does Apple’s iPhone “Full Page” screenshot feature provide an app API for UIWebView?
No. It is a user-facing device workflow, not an API contract for capturing a web view from an IBAction.
Free tools Windows power users keep installed
One-click scans. No signup required.
Can an iframe or cross-origin resource be guaranteed in a full image?
No. The legacy approach has no such guarantee; loading behavior, security boundaries, lazy content, and the WebKit version can change the result.
Should UIWebView be used for a new feature?
No. Apple’s documented replacement is WKWebView; retain UIWebView only for constrained legacy maintenance.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

