Contents

init(name:subdirectory:locale:bundle:)

Creates a URL resource from the given bundle, name, and subdirectory, optionally specifying a locale.

Declaration

init(name: String, subdirectory: String? = nil, locale: Locale = .current, bundle: Bundle = .main)

Parameters

  • name:

    The name of the resource in the bundle. This should include both the resource name and its extension, to avoid confusion.

  • subdirectory:

    The subdirectory, if any, of the resource.

  • locale:

    The locale of the resource, as provided by the process that creates the resource. This defaults to Current.

  • bundle:

    The bundle containing the resource. This defaults to Main.