<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "TouchController",
  "identifier" : "/documentation/TouchController/TCButtonDescriptor",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Touch Controller"
    ],
    "preciseIdentifier" : "c:objc(cs)TCButtonDescriptor"
  },
  "title" : "TCButtonDescriptor"
}
-->

# TCButtonDescriptor

A descriptor for configuring a button.

```
class TCButtonDescriptor
```

## Topics

### Creating the descriptor

[`init()`](/documentation/TouchController/TCButtonDescriptor/init())

Creates a new button descriptor with default values.

### Inspecting the descriptor

[`var contents: TCControlContents?`](/documentation/TouchController/TCButtonDescriptor/contents)

The contents for the button in its normal state.

[`var highlightDuration: TimeInterval`](/documentation/TouchController/TCButtonDescriptor/highlightDuration)

The time it takes for a highlight to fade away, in seconds.

[`var zIndex: Int`](/documentation/TouchController/TCButtonDescriptor/zIndex)

The z-index of the button. A lower z-index is drawn first.

[`var label: TCControlLabel`](/documentation/TouchController/TCButtonDescriptor/label)

The label you associate with the button.

[`var offset: CGPoint`](/documentation/TouchController/TCButtonDescriptor/offset)

The control’s offset from the anchor, which determines its position.

[`var size: CGSize`](/documentation/TouchController/TCButtonDescriptor/size)

The size (width, height) of the button in points.

### Accessing the anchor

[`var anchor: TCControlLayoutAnchor`](/documentation/TouchController/TCButtonDescriptor/anchor)

The anchor point that the button’s offset is relative to.

[`enum TCControlLayoutAnchor`](/documentation/TouchController/TCControlLayoutAnchor)

Defines the anchor point for a control.

[`var anchorCoordinateSystem: TCControlLayoutAnchorCoordinateSystem`](/documentation/TouchController/TCButtonDescriptor/anchorCoordinateSystem)

The coordinate system for the control’s anchor point.

[`enum TCControlLayoutAnchorCoordinateSystem`](/documentation/TouchController/TCControlLayoutAnchorCoordinateSystem)

Defines the coodinate system for an anchor point.

### Getting the collider shape

[`var colliderShape: TCColliderShape`](/documentation/TouchController/TCButtonDescriptor/colliderShape)

The shape of collider to use for the button.

[`enum TCColliderShape`](/documentation/TouchController/TCColliderShape)

Defines the shape of a control collider.

## Relationships

### Conforms To

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`Hashable`](/documentation/Swift/Hashable)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)