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
urlis a relative URL, settingresolvetotruecreates components using the Absoluteurl property.