---
title: UIWebViewDelegate
framework: uikit
role: symbol
role_heading: Protocol
path: uikit/uiwebviewdelegate
---

# UIWebViewDelegate

The UIWebViewDelegate protocol defines methods that a delegate of a UIWebView object can optionally implement to intervene when web content is loaded.

## Declaration

```swift
@MainActor protocol UIWebViewDelegate : NSObjectProtocol
```

## Overview

Overview important: Before releasing an instance of UIWebView for which you have set a delegate, you must first set the UIWebView delegate property to nil before disposing of the UIWebView instance. This can be done, for example, in the dealloc method where you dispose of the UIWebView.

## Topics

### Loading Content

- [webView(_:shouldStartLoadWith:navigationType:)](uikit/uiwebviewdelegate/webview(_:shouldstartloadwith:navigationtype:).md)
- [webViewDidStartLoad(_:)](uikit/uiwebviewdelegate/webviewdidstartload(_:).md)
- [webViewDidFinishLoad(_:)](uikit/uiwebviewdelegate/webviewdidfinishload(_:).md)
- [webView(_:didFailLoadWithError:)](uikit/uiwebviewdelegate/webview(_:didfailloadwitherror:).md)

## Relationships

### Inherits From

- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Responding to web view changes

- [delegate](uikit/uiwebview/delegate.md)
