ControlWidgetConfigurationBuilder
A custom attribute that constructs a control widget’s body.
Declaration
@resultBuilder struct ControlWidgetConfigurationBuilderOverview
The @ControlWidgetConfigurationBuilder attribute allows your control widget’s body closure to produce a control widget configuration after zero or more other statements:
struct GarageDoorOpener: ControlWidget {
var body: some ControlWidgetConfiguration {
let kind = "com.yourcompany.GarageDoorOpener"
StaticControlConfiguration(
kind: kind
) {
...
}
}
}