Type Method

componentsWithURL:resolvingAgainstBaseURL:

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

Declaration

+ (instancetype)componentsWithURL:(NSURL *)url resolvingAgainstBaseURL:(BOOL)resolve;

Parameters

url

The URL to parse.

resolve

Controls whether the URL should be resolved against its base URL before parsing. If YES, and if the url parameter contains a relative URL, the original URL is resolved against its base URL before parsing by calling the absoluteURL method. Otherwise, the string portion is used by itself.

Return Value

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

See Also

Creating URL Components

+ componentsWithString:

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

- init

Initializes a URL components object with nil for every component.

- initWithString:

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

- initWithURL:resolvingAgainstBaseURL:

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software