EmptyStateSettings
Settings that define how an empty inbox looks when there are no content cards to display.
Struct Definition
Copied to your clipboardpublic struct EmptyStateSettings: Codable
Public Properties
| Property | Type | Description |
|---|---|---|
message | Optional text message to display in the empty state. Configured in Adobe Journey Optimizer. | |
image | Optional image to display in the empty state. Configured in Adobe Journey Optimizer. |
Usage
EmptyStateSettings is passed to the custom empty view builder set via InboxUI.setEmptyView(_:). Use configured values when available and fall back to your own defaults otherwise.
Swift
Copied to your clipboardinboxUI.setEmptyView { emptyStateSettings inAnyView(VStack(spacing: 16) {if let image = emptyStateSettings?.image {image.view.frame(maxWidth: 120, maxHeight: 120)} else {Image(systemName: "tray").font(.system(size: 60)).foregroundColor(.gray)}if let message = emptyStateSettings?.message {message.view.multilineTextAlignment(.center)} else {Text("No messages").font(.headline).foregroundColor(.secondary)}}.frame(maxWidth: .infinity, maxHeight: .infinity).padding())}
