---
title: unitStyle
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/lengthformatter/unitstyle
---

# unitStyle

The unit style used by this formatter.

## Declaration

```swift
var unitStyle: Formatter.UnitStyle { get set }
```

## Discussion

Discussion This property defaults to Formatter.UnitStyle.medium. For a complete list of unit styles, see Formatter.UnitStyle.

## See Also

### Formatting Length Strings

- [isForPersonHeightUse](foundation/lengthformatter/isforpersonheightuse.md)
- [getObjectValue(_:for:errorDescription:)](foundation/lengthformatter/getobjectvalue(_:for:errordescription:).md)
- [numberFormatter](foundation/lengthformatter/numberformatter.md)
- [string(fromMeters:)](foundation/lengthformatter/string(frommeters:).md)
- [string(fromValue:unit:)](foundation/lengthformatter/string(fromvalue:unit:).md)
- [unitString(fromMeters:usedUnit:)](foundation/lengthformatter/unitstring(frommeters:usedunit:).md)
- [unitString(fromValue:unit:)](foundation/lengthformatter/unitstring(fromvalue:unit:).md)
