ORKWeightAnswerFormat Class Reference
| Inherits from | ORKAnswerFormat : NSObject |
|---|---|
| Declared in | ORKAnswerFormat.h ORKAnswerFormat.m |
Overview
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.
Other Methods
– init
Returns an initialized weight answer format using the measurement system specified in the current locale.
- (instancetype)initReturn 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)measurementSystemParameters
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)numericPrecisionParameters
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)defaultValueParameters
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 measurementSystemDeclared In
ORKAnswerFormat.h
numericPrecision
The numeric precision used by the picker.
@property (readonly, getter=isAdditionalPrecision) ORKNumericPrecision numericPrecisionDiscussion
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 minimumValueDiscussion
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 maximumValueDiscussion
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 defaultValueDiscussion
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
Other Methods
– questionType
The type of question. (read-only)
- (ORKQuestionType)questionTypeDiscussion
You can use this enumerated value in your Objective-C code to switch on a rough approximation of the type of question that is being asked.
Note that answer format subclasses override the getter to return the appropriate question type.
Declared In
ORKAnswerFormat.h