Function 関数

object_setIvar(_:_:_:)

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

Declaration 宣言

func object_setIvar(_ obj: Any?, 
                  _ ivar: Ivar, 
                  _ value: Any?)

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 インスタンスを扱う