<!--
{
  "availability" : [
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/WKUserNotificationHostingController",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI35WKUserNotificationHostingControllerC"
  },
  "title" : "WKUserNotificationHostingController"
}
-->

# WKUserNotificationHostingController

A WatchKit user notification interface controller that hosts a SwiftUI view
hierarchy.

```
@MainActor @preconcurrency class WKUserNotificationHostingController<Body> where Body : View
```

## Overview

A [`WKUserNotificationHostingController`](/documentation/SwiftUI/WKUserNotificationHostingController) presents and manages your app’s
notification interface using SwiftUI views. You must subclass
[`WKUserNotificationHostingController`](/documentation/SwiftUI/WKUserNotificationHostingController) and override the
[`body`](/documentation/SwiftUI/WKUserNotificationHostingController/body) property to provide the set of
SwiftUI views you want to display. In the storyboard of your watch app,
specify the name of your custom class for your dynamic interactive
interface.

## Topics

### Creating a hosting controller object

[`init()`](/documentation/SwiftUI/WKUserNotificationHostingController/init())

Creates a notification hosting controller object that you can use to implement your
notification interfaces using SwiftUI views.

### Getting the root view

[`body`](/documentation/SwiftUI/WKUserNotificationHostingController/body)

The root view of the view hierarchy to display for your notification
interface.

### Configuring the notification

[`coalescedDescriptionFormat`](/documentation/SwiftUI/WKUserNotificationHostingController/coalescedDescriptionFormat)

The format string to display when multiple notifications of the same
type arrive simultaneously. If you specify a custom string, you can use
the %d variable to reflect the number of notifications. If `nil` format
will be the system default.

[`isInteractive`](/documentation/SwiftUI/WKUserNotificationHostingController/isInteractive)

If the notification should accept user input.

[`sashColor`](/documentation/SwiftUI/WKUserNotificationHostingController/sashColor)

Color to use within the sash of the long look interface. If `nil` the
sash will be the default system color.

[`subtitleColor`](/documentation/SwiftUI/WKUserNotificationHostingController/subtitleColor)

The color to apply to the subtitle text displayed in the short look
interface. If `nil` the text will be the default system color.

[`titleColor`](/documentation/SwiftUI/WKUserNotificationHostingController/titleColor)

The color to apply to the text displayed in the sash. If `nil` the text
will be the default system color.

[`wantsSashBlur`](/documentation/SwiftUI/WKUserNotificationHostingController/wantsSashBlur)

If the sash should include a blur over the background.



---

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)