Contents

init(_:prefersPromotionalIcon:)

Creates a view to merchandise an individual product.

Declaration

nonisolated init(_ product: Product, prefersPromotionalIcon: Bool = true) where Icon == EmptyView, PlaceholderIcon == EmptyView

Parameters

  • product:

    The product to merchandise.

  • prefersPromotionalIcon:

    A Boolean value that indicates whether to use the promotional image from the App Store, if it’s available. If this value is true and a promotional image for the product is available, the view displays it.

Discussion

If the product has a promotional image available, the view displays it. Otherwise, the view doesn’t show an image.

If you set the prefersPromotionalIcon parameter to false, the view doesn’t show an image even if the product has a promotional image available.

See Also

Creating product views with preloaded products