<!--
{
  "availability" : [
    "iOS: 2.0.0 - 12.0.0",
    "iPadOS: 2.0.0 - 12.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIWebViewDelegate/webView(_:shouldStartLoadWith:navigationType:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UIWebViewDelegate(im)webView:shouldStartLoadWithRequest:navigationType:"
  },
  "title" : "webView(_:shouldStartLoadWith:navigationType:)"
}
-->

# webView(_:shouldStartLoadWith:navigationType:)

Sent before a web view begins loading a frame.

```
optional func webView(_ webView: UIWebView, shouldStartLoadWith request: URLRequest, navigationType: UIWebView.NavigationType) -> Bool
```

## Parameters

`webView`

The web view that is about to load a new frame.

`request`

The content location.

`navigationType`

The type of user action that started the load request.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the web view should begin loading content; otherwise, <doc://com.apple.documentation/documentation/Swift/false> .

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)