SubscriptionStorePicker
A composite control with a picker for selecting a subscription option and a button for confirming the subscription.
Declaration
@MainActor @preconcurrency struct SubscriptionStorePicker<PickerContent, ConfirmationContent> where PickerContent : View, ConfirmationContent : ViewOverview
When implementing custom subscription store control styles conforming to SubscriptionStoreControlStyle, you can use this view to utilize the standard subscription picker as a component of the view you provide from makeBody(configuration:). The subscription picker is a composite control: it contains both a picker for choosing an option, and a button to subscribe to the selected option.
This control is the same as used in standard control styles such as picker.
There are two primary ways to create a subscription picker:
Provide the SubscriptionStoreControlStyleConfiguration value to the subscription picker, and use the components of each option to declare the option’s label.
Provide a collection of views for the picker’s content, using a SubscriptionStorePickerOption to declare the options.
Either way, you also need to declare a view to confirm the subscription after someone selects an option.
You can optionally provide a binding to a SubscriptionStoreControlStyleConfiguration.Option to observe selection changes, or programmatically change selections. If you don’t provide a binding, the subscription picker manages its own selection state.