Function 関数

object_setIvar

Sets the value of an instance variable in an object. あるオブジェクトの中のあるインスタンス変数の値を設定します。

Declaration 宣言

void object_setIvar(id obj, Ivar ivar, id value);

Parameters パラメータ

object

The object containing the instance variable whose value you want to set.

ivar

The Ivar describing the instance variable whose value you want to set.

value

The new value for the instance variable.

Discussion 解説

object_setIvar is faster than object_setInstanceVariable if the Ivar for the instance variable is already known.

See Also 参照

Working with Instances インスタンスを扱う