Contents

init(url:resolvingAgainstBaseURL:)

Creates a URL components instance from a URL string, optionally resolving against a base URL.

Declaration

init?(url: URL, resolvingAgainstBaseURL resolve: Bool)

Parameters

  • url:

    The URL string to parse.

  • resolve:

    Controls whether the initializer resolves the URL against its base URL before parsing. If url is a relative URL, setting resolve to true creates components using the Absoluteurl property.

See Also

Creating URL components