---
title: tracking
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsattributedstring/key/tracking
---

# tracking

The amount to modify the default tracking.

## Declaration

```swift
static let tracking: NSAttributedString.Key
```

## Discussion

Discussion The value of this attribute is an NSNumber object containing a floating-point value. The value represents the amount of space, in points, to add between the specified characters. A positive value increases the spacing between characters, and a negative value brings the characters closer together. Specify 0 to disable tracking. The effect of this attribute is similar to the effect of kern, but the system treats tracking as trailing whitespace. A nonzero amount of tracking disables nonessential ligatures, unless the ligature attribute is present.

## See Also

### Getting rendering attribute keys

- [backgroundColor](foundation/nsattributedstring/key/backgroundcolor.md)
- [baselineOffset](foundation/nsattributedstring/key/baselineoffset.md)
- [font](foundation/nsattributedstring/key/font.md)
- [foregroundColor](foundation/nsattributedstring/key/foregroundcolor.md)
- [glyphInfo](foundation/nsattributedstring/key/glyphinfo.md)
- [kern](foundation/nsattributedstring/key/kern.md)
- [ligature](foundation/nsattributedstring/key/ligature.md)
- [paragraphStyle](foundation/nsattributedstring/key/paragraphstyle.md)
- [strikethroughColor](foundation/nsattributedstring/key/strikethroughcolor.md)
- [strikethroughStyle](foundation/nsattributedstring/key/strikethroughstyle.md)
- [strokeColor](foundation/nsattributedstring/key/strokecolor.md)
- [strokeWidth](foundation/nsattributedstring/key/strokewidth.md)
- [superscript](foundation/nsattributedstring/key/superscript.md)
- [underlineColor](foundation/nsattributedstring/key/underlinecolor.md)
- [underlineStyle](foundation/nsattributedstring/key/underlinestyle.md)
