Initializer

init(string:)

Initializes a URL components object by parsing a URL in string form.

Declaration

init?(string URLString: String)

Parameters

URLString

The URL string to parse.

Return Value

Returns the initialized URL components object, or nil if the URL string could not be parsed.

See Also

Creating URL Components

init()

Initializes a URL components object with nil for every component.

init?(url: URL, resolvingAgainstBaseURL: Bool)

Initializes a URL components object by parsing the URL from an NSURL object.