---
title: baseUnit()
framework: foundation
role: symbol
role_heading: Type Method
path: foundation/dimension/baseunit()
---

# baseUnit()

Returns the base unit.

## Declaration

```swift
class func baseUnit() -> Self
```

## Return Value

Return Value An NSDimension subclass object from which all other units provided by the subclass are defined.

## Discussion

Discussion The default implementation returns nil to indicate that the NSDimension class should not be used directly. When implementing a subclass, you should return a unit converter that returns the inputted value for both the baseUnitValueFromValue: and valueFromBaseUnitValue: methods. You can create a unit converter for a base unit using the UnitConverterLinear init(coefficient:) initializer, passing 1 as the coefficient.
