ORKWeightAnswerFormat Class Reference
Inherits from | ORKAnswerFormat : NSObject |
---|---|
Declared in | ORKAnswerFormat.h |
The ORKWeightAnswerFormat
class represents the answer format for questions that require users
to enter a weight.
A weight answer format produces an ORKNumericQuestionResult
object. The result is always reported
in the metric system using the kg
unit.
– init
Returns an initialized weight answer format using the measurement system specified in the current locale.
- (instancetype)init
Return Value
An initialized weight answer format.
Declared In
ORKAnswerFormat.h
– initWithMeasurementSystem:
Returns an initialized weight answer format using the specified measurement system.
- (instancetype)initWithMeasurementSystem:(ORKMeasurementSystem)measurementSystem
Parameters
measurementSystem |
The measurement system to use. See |
---|
Return Value
An initialized weight answer format.
Discussion
This method is the designated initializer.
Declared In
ORKAnswerFormat.h
– initWithMeasurementSystem:numericPrecision:
Returns an initialized weight answer format using the specified measurement system and numeric precision.
- (instancetype)initWithMeasurementSystem:(ORKMeasurementSystem)measurementSystem numericPrecision:(ORKNumericPrecision)numericPrecision
Parameters
measurementSystem |
The measurement system to use. See |
---|---|
numericPrecision |
The numeric precision used by the picker. If you pass
|
Return Value
An initialized weight answer format.
Declared In
ORKAnswerFormat.h
– initWithMeasurementSystem:numericPrecision:minimumValue:maximumValue:defaultValue:
Returns an initialized weight answer format using the specified measurement system, numeric precision, and default, minimum and maximum values.
- (instancetype)initWithMeasurementSystem:(ORKMeasurementSystem)measurementSystem numericPrecision:(ORKNumericPrecision)numericPrecision minimumValue:(double)minimumValue maximumValue:(double)maximumValue defaultValue:(double)defaultValue
Parameters
measurementSystem |
The measurement system to use. See |
---|---|
numericPrecision |
The numeric precision used by the picker. If you pass
|
minimumValue |
The minimum value that is displayed in the picker. If you specify
|
maximumValue |
The maximum value that is displayed in the picker. If you specify
|
defaultValue |
The default value to be initially selected in the picker. If you
specify |
Return Value
An initialized weight answer format.
Declared In
ORKAnswerFormat.h
measurementSystem
Indicates the measurement system used by the answer format.
@property (readonly) ORKMeasurementSystem measurementSystem
Declared In
ORKAnswerFormat.h
numericPrecision
The numeric precision used by the picker.
@property (readonly, getter=isAdditionalPrecision) ORKNumericPrecision numericPrecision
Discussion
An ORKNumericPrecisionDefault
value indicates that the picker will use 0.5 kg increments for the
metric measurement system and whole pound increments for the USC measurement system, which mimics
the default iOS behavior. An ORKNumericPrecisionLow
value indicates that the picker will use
1 kg increments for the metric measurement system and whole pound increments for the USC
measurement system. An ORKNumericPrecisionHigher
value indicates that the picker will use
0.01 gr increments for the metric measurement system and ounce increments for the USC measurement
system.
The default value of this property is ORKNumericPrecisionDefault
.
Declared In
ORKAnswerFormat.h
minimumValue
The minimum value that is displayed in the picker.
@property (readonly) double minimumValue
Discussion
When this property has a value equal to ORKDefaultValue
, the minimum values are 0 kg when using
the metric measurement system and 0 lbs when using the USC measurement system.
Declared In
ORKAnswerFormat.h
maximumValue
The maximum value that is displayed in the picker.
@property (readonly) double maximumValue
Discussion
When this property has a value equal to ORKDefaultValue
, the maximum values are 657 kg when using
the metric measurement system and 1,450 lbs when using the USC measurement system.
Declared In
ORKAnswerFormat.h
defaultValue
The default value to initially selected in the picker.
@property (readonly) double defaultValue
Discussion
When this property has a value equal to ORKDefaultValue
, the initally selected values are 60 kg
when using the metric measurement system and 133 lbs when using the USC measurement system. This
value must be between minimumValue
and maximumValue
.
Declared In
ORKAnswerFormat.h