<!--
{
  "availability" : [
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/WKHostingController/setNeedsBodyUpdate()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI19WKHostingControllerC18setNeedsBodyUpdateyyF"
  },
  "title" : "setNeedsBodyUpdate()"
}
-->

# setNeedsBodyUpdate()

Invalidates the current SwiftUI views and triggers an update during the
next cycle.

```
@MainActor @preconcurrency func setNeedsBodyUpdate()
```

## Discussion

Call this method to mark the views of the hosting controller as needing
an update. During the next update cycle, the hosting controller fetches
an updated set of views from its [`body`](/documentation/SwiftUI/WKHostingController/body) property.

---

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)