public final class RSDMassInputTableItem : RSDTextInputTableItem
A custom implementation for inputing a person’s mass (weight) that can set up a picker for
setting the weight of an infant. Typically, US participants know what their newborn baby’s
weight is in lb and oz. Additionally, the placeholder text for an adult or child measurement
range will be either
kilograms, depending upon the participant’s locale.
The base unit is the unit of mass that the measurement should be converted to in order to save the result. Because the
Measurementclass has a generic
UnitType, it cannot be easily converted to a
Codableobject so the results are stored as
.decimalbase type with the unit symbol also stored on the result.
public let baseUnit: UnitMass
The index of this item relative to all rows in the section in which this item resides.
The RSDInputField representing this tableItem.
The UI hint for this row of the table.
The measurement range for the input field.
convertAnswer()function to convert the
Measurementreturned by the formatter into a decimal value in the
override public func convertAnswer(_ newValue: Any) throws -> Any?