Function 関数

class_addProperty(_:_:_:_:)

Adds a property to a class. あるプロパティをあるクラスに加えます。

Declaration 宣言

func class_addProperty(_ cls: AnyClass?, 
                     _ name: UnsafePointer<CChar>, 
                     _ attributes: UnsafePointer<objc_property_attribute_t>?, 
                     _ attributeCount: UInt32) -> Bool

Parameters パラメータ

cls

The class to modify.

name

The name of the property.

attributes

An array of property attributes.

attributeCount

The number of attributes in attributes.

Return Value 戻り値

true if the property was added successfully; otherwise false (for example, this function returns false if the class already has that property).

See Also 参照

Working with Classes クラスを扱う