<!--
{
  "availability" : [
    "iOS: 2.0.0 - 12.0.0",
    "iPadOS: 2.0.0 - 12.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIWebView/delegate",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIWebView(py)delegate"
  },
  "title" : "delegate"
}
-->

# delegate

The receiver’s delegate.

```
unowned(unsafe) var delegate: (any UIWebViewDelegate)? { get set }
```

## Discussion

The delegate is sent messages when content is loading. See [`UIWebViewDelegate`](/documentation/UIKit/UIWebViewDelegate) for the optional methods this delegate may implement.

> Important:
> Before releasing an instance of `UIWebView` for which you have set a delegate, you must first set its delegate property to `nil`. This can be done, for example, in your dealloc method.

---

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)