---
title: unitStyle
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/massformatter/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 Mass Strings

- [isForPersonMassUse](foundation/massformatter/isforpersonmassuse.md)
- [getObjectValue(_:for:errorDescription:)](foundation/massformatter/getobjectvalue(_:for:errordescription:).md)
- [numberFormatter](foundation/massformatter/numberformatter.md)
- [string(fromKilograms:)](foundation/massformatter/string(fromkilograms:).md)
- [string(fromValue:unit:)](foundation/massformatter/string(fromvalue:unit:).md)
- [unitString(fromKilograms:usedUnit:)](foundation/massformatter/unitstring(fromkilograms:usedunit:).md)
- [unitString(fromValue:unit:)](foundation/massformatter/unitstring(fromvalue:unit:).md)
