init(id:content:filter:)
Creates a configuration with an identifier and a view.
Declaration
@MainActor init(id: HomeContentID, @ContentBuilder content: @escaping () -> some View, filter: @escaping HomeAccessoryConfiguration.SupportsAccessory = { _ in true })Parameters
- id:
The configuration’s identifier.
- content:
A view builder that creates the configuration view.
- filter:
A closure that returns
truefor each accessory that the configuration applies to. By default, the configuration applies to all accessories.