ControlValueProvider
protocol · iOS 18.0+ · SDK 27.1
protocol ControlValueProviderA type that provides a value to a control template. The provider quickly and cheaply prepares a synchronous value to be shown while previewing the control in the add sheet. When the actual control needs to be rendered, the actual, current value will be fetched asynchronously. For instance, a control that opens and closes a garage door may show a preview of the door being closed. When the actual control is rendered, the control may fetch the door's status from the cloud: struct GarageDoorValueProvider: ControlValueProvider { var previewValue: Bool { false } func currentValue() async -> Bool { await GarageDoorManager.shared.doorStatus() } }
Members (0)
This type has no directly callable members in this snapshot. See the framework’s skipped declarations for unsupported APIs.
Skipped declarations
No declarations were skipped in this snapshot.