A numeric quantity labeled with a unit of measure, with support for unit conversion and unit-aware calculations.
- iOS 10.0+
- macOS 10.12+
- Mac Catalyst 13.0+
- tvOS 10.0+
- watchOS 3.0+
NSMeasurement object represents a quantity and unit of measure. The
NSMeasurement class provides a programmatic interface to converting measurements into different units, as well as calculating the sum or difference between two measurements.
NSMeasurement objects are initialized with an
NSUnit object and
NSMeasurement objects are immutable, and cannot be changed after being created.
You can use the
NSMeasurement class to create localized string representations of