<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/UIViewRepresentable/updateUIView(_:context:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI19UIViewRepresentableP06updateC0_7contexty0C4TypeQz_AA0cD7ContextVyxGtF"
  },
  "title" : "updateUIView(_:context:)"
}
-->

# updateUIView(_:context:)

Updates the state of the specified view with new information from
SwiftUI.

```
@MainActor @preconcurrency func updateUIView(_ uiView: Self.UIViewType, context: Self.Context)
```

## Parameters

`uiView`

Your custom view object.

`context`

A context structure containing information about the current
state of the system.

## Discussion

When the state of your app changes, SwiftUI updates the portions of your
interface affected by those changes. SwiftUI calls this method for any
changes affecting the corresponding UIKit view. Use this method to
update the configuration of your view to match the new state information
provided in the `context` parameter.

---

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)