Initializer

init(url:resolvingAgainstBaseURL:)

Initializes with the components of a URL.

Declaration

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

Discussion

If resolvingAgainstBaseURL is true and url is a relative URL, the components of url.absoluteURL are used. If the url string from the URL is malformed, nil is returned.

See Also

Creating URL Components

init()

Initializes with all components undefined.

init?(string: String)

Initializes from a URL string.