Contents

init(_:bundle:label:)

Creates a labeled image that you can use as content for controls, with the specified label.

Declaration

init(_ name: String, bundle: Bundle? = nil, label: Text)

Parameters

  • name:

    The name of the image resource to lookup

  • bundle:

    The bundle to search for the image resource. If nil, SwiftUI uses the main Bundle. Defaults to nil.

  • label:

    The label associated with the image. SwiftUI uses the label for accessibility.

See Also

Creating an image for use as a control