---
title: length
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiattachmentbehavior/length
---

# length

The distance, in points, between the two attachment points of the attachment behavior.

## Declaration

```swift
var length: CGFloat { get set }
```

## Discussion

Discussion Use this property to adjust the attachment length, if you want to, after creating an attachment. The system sets initial length automatically based on how you initialize the attachment.

## See Also

### Configuring an attachment behavior

- [anchorPoint](uikit/uiattachmentbehavior/anchorpoint.md)
- [attachedBehaviorType](uikit/uiattachmentbehavior/attachedbehaviortype.md)
- [damping](uikit/uiattachmentbehavior/damping.md)
- [frequency](uikit/uiattachmentbehavior/frequency.md)
- [frictionTorque](uikit/uiattachmentbehavior/frictiontorque.md)
- [attachmentRange](uikit/uiattachmentbehavior/attachmentrange.md)
