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

initWithBytes:objCType:

Initializes a value object to contain the specified value, interpreted with the specified Objective-C type. ある値オブジェクトを初期化して、指定されたObjective-C型で解釈される、この指定された値を含むようにします。

Declaration 宣言

- (instancetype)initWithBytes:(const void *)value 
                     objCType:(const char *)type;

Parameters パラメータ

value

A pointer to data to be stored in the new value object. 新しい値オブジェクトの中に格納されることになるデータへのポインタ。

type

The Objective-C type of value, as provided by the @encode() compiler directive. Do not hard-code this parameter as a C string. valueのObjective-C型、@encode()コンパイラ指令によって提供されるように。このパラメータをC文字列としてハードコードしないでください。

Return Value 戻り値

An initialized value object that contains value, which is interpreted as being of the Objective-C type type. The returned object might be different than the original receiver. valueを含む初期化された値オブジェクト、それはObjective-C型typeのものであると解釈されます。返されるオブジェクトは、オリジナルのレシーバとは異なるかもしれません。

Discussion 議論

See Number and Value Programming Topics for other considerations in creating a value object. Number and Value Programming Topicsを、値オブジェクト作成における他の考慮すべき事柄として見てください。

This is the designated initializer for the NSValue class. これは、NSValueクラスに対する指定イニシャライザです。

See Also 参照

Working with Raw Values 生の値を扱う

Related Documentation 関連文書