Instance Method インスタンスメソッド

initWithScheme:host:path:

Initializes a newly created NSURL with a specified scheme, host, and path. 新しく作成されたNSURLを初期化します、指定されたスキーム、ホスト、そしてパスを使います。

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. NSURLオブジェクトに対するスキーム。例えば、URL http://www.example.com/index.htmlにおいて、スキームはhttpです。

host

The host for the NSURL object (for example, www.example.com). May be the empty string. NSURLオブジェクトに対するホスト(例えば、www.example.com)。空の文字列かもしれません。

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. NSURLオブジェクトに対するパス(例えば、/index.html)。パスがチルダで始まるならば、あなたは最初にそれをstringByExpandingTildeInPathを呼び出すことによって展開しなければいけません。

Return Value 戻り値

The newly initialized NSURL object. 新しく初期化されたNSURLオブジェクト。

Discussion 議論

This method automatically uses percent encoding to escape the path and host parameters. このメソッドは、自動的にパーセント符号化を使って、pathhostパラメータをエスケープします。

See Also 参照

Deprecated 非推奨

Related Documentation 関連文書