Web Views

Explore iOS WKWebView options interactively. Change properties in the control panel to see them reflected on the iPhone screen instantly.

9:41
●●●● WiFi 🔋
apple.com

Welcome

Discover amazing products designed for everyone.

Experience innovation at its finest. Our latest products combine cutting-edge technology with elegant design to create something truly extraordinary.

From powerful chips to stunning displays, every detail has been carefully considered to deliver the best possible experience.

Privacy is a fundamental human right. We design our products and services to protect your personal information and put you in control.

⚠️ HIG Violation: Improper use of web view
📚 HIG Guidelines — Try It Yourself
✓ Do — Good Example
✗ Don't — Bad Example

✓ Do This

  • Show loading state with a progress indicator
  • Handle navigation errors gracefully
  • Use SFSafariViewController for general web browsing
  • Respect the user's content blockers

✗ Don't Do This

  • Replace native UI with web content unnecessarily
  • Hide the URL bar for untrusted content
  • Disable standard navigation gestures
  • Load content without HTTPS

👆 See the bad pattern in the iPhone preview above

Show Navigation Bar
Show Progress Bar
Allow Zoom
Default
Dark
Reader
SwiftUI Code
import WebKit struct WebView: UIViewRepresentable { let url: URL func makeUIView(context: Context) -> WKWebView { let config = WKWebViewConfiguration() let webView = WKWebView(frame: .zero, configuration: config) webView.allowsBackForwardNavigationGestures = true return webView } func updateUIView(_ webView: WKWebView, context: Context) { webView.load(URLRequest(url: url)) } }