Contents

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 : View

Overview

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:

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.

Topics

Creating a subscription store picker

Managing a subscription picker’s selection state

See Also

Creating custom subscription store control styles