---
title: "class_replaceProperty(_:_:_:_:)"
framework: Objective-C Runtime
role: symbol
role_heading: Function
platforms: [iOS 4.3+, iPadOS 4.3+, Mac Catalyst 13.1+, macOS 10.7+, tvOS 9.0+, visionOS 1.0+, watchOS 1.0+]
path: "objectivec/class_replaceproperty(_:_:_:_:)"
---

# class_replaceProperty(_:_:_:_:)

Replace a property of a class.

## Declaration

```swift
func class_replaceProperty(_ cls: AnyClass?, _ name: UnsafePointer<CChar>, _ attributes: UnsafePointer<objc_property_attribute_t>?, _ attributeCount: UInt32)
```

## 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.

## See Also

### Working with Classes

- [class_getName(_:)](objectivec/class_getname(_:).md)
- [class_getSuperclass(_:)](objectivec/class_getsuperclass(_:).md)
- [class_setSuperclass(_:_:)](objectivec/class_setsuperclass(_:_:).md)
- [class_isMetaClass(_:)](objectivec/class_ismetaclass(_:).md)
- [class_getInstanceSize(_:)](objectivec/class_getinstancesize(_:).md)
- [class_getInstanceVariable(_:_:)](objectivec/class_getinstancevariable(_:_:).md)
- [class_getClassVariable(_:_:)](objectivec/class_getclassvariable(_:_:).md)
- [class_addIvar(_:_:_:_:_:)](objectivec/class_addivar(_:_:_:_:_:).md)
- [class_copyIvarList(_:_:)](objectivec/class_copyivarlist(_:_:).md)
- [class_getIvarLayout(_:)](objectivec/class_getivarlayout(_:).md)
- [class_setIvarLayout(_:_:)](objectivec/class_setivarlayout(_:_:).md)
- [class_getWeakIvarLayout(_:)](objectivec/class_getweakivarlayout(_:).md)
- [class_setWeakIvarLayout(_:_:)](objectivec/class_setweakivarlayout(_:_:).md)
- [class_getProperty(_:_:)](objectivec/class_getproperty(_:_:).md)
- [class_copyPropertyList(_:_:)](objectivec/class_copypropertylist(_:_:).md)
