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) -> BoolParameters
- 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
YES if the property was added successfully; otherwise NO (for example, this function returns NO if the class already has that property).
See Also
Working with Classes
class_getName(_:)class_getSuperclass(_:)class_setSuperclass(_:_:)class_isMetaClass(_:)class_getInstanceSize(_:)class_getInstanceVariable(_:_:)class_getClassVariable(_:_:)class_addIvar(_:_:_:_:_:)class_copyIvarList(_:_:)class_getIvarLayout(_:)class_setIvarLayout(_:_:)class_getWeakIvarLayout(_:)class_setWeakIvarLayout(_:_:)class_getProperty(_:_:)class_copyPropertyList(_:_:)