An abstract class representing a unit of measure.
- iOS 10.0+
- macOS 10.12+
- Mac Catalyst 13.0+Beta
- tvOS 10.0+
- watchOS 3.0+
Dimension subclass is an abstract class that represents a dimensional unit, which can be converted into different units of the same type. The Foundation framework provides several concrete
Dimension subclasses to represent the most common physical quantities, including mass, length, duration, and speed.
NSUnit is intended for subclassing. For dimensional units, you should use one of the Apple provided
Dimension subclasses listed in Table 1, or create a custom subclass of
Dimension. You can create a direct subclass of
NSUnit to represent a custom dimensionless unit, such as a count, score, or ratio.