Instance Method

initWithScheme:host:path:

Initializes a newly created NSURL with a specified scheme, host, and path.

Declaration

- (instancetype)initWithScheme:(NSString *)scheme host:(NSString *)host path:(NSString *)path;

Parameters

scheme

The scheme for the NSURL object. For example, in the URL http://www.example.com/index.html, the scheme is http.

host

The host for the NSURL object (for example, www.example.com). May be the empty string.

path

The path for the NSURL object (for example, /index.html). If the path begins with a tilde, you must first expand it by calling stringByExpandingTildeInPath.

Return Value

The newly initialized NSURL object.

Discussion

This method automatically uses percent encoding to escape the path and host parameters.

See Also

Deprecated

- URLHandleUsingCache:

Returns a URL handle to service the receiver.

Deprecated
- loadResourceDataNotifyingClient:usingCache:

Loads the receiver’s resource data in the background.

Deprecated
- resourceDataUsingCache:

Returns the receiver’s resource data, loading it if necessary.

Deprecated
- setResourceData:

Attempts to set the resource data for the receiver.

Deprecated
- propertyForKey:

Returns the specified property of the receiver’s resource.

Deprecated
- setProperty:forKey:

Changes the specified property of the receiver’s resource.

Deprecated