<!--
{
  "availability" : [
    "iOS: 4.3.0 -",
    "iPadOS: 4.3.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.7.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ObjectiveC",
  "identifier" : "/documentation/ObjectiveC/class_replaceProperty(_:_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Objective-C Runtime"
    ],
    "preciseIdentifier" : "c:@F@class_replaceProperty"
  },
  "title" : "class_replaceProperty(_:_:_:_:)"
}
-->

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

Replace a property of a class.

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

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)