ORKTimeOfDayAnswerFormat Class Reference
Inherits from | ORKAnswerFormat : NSObject |
---|---|
Declared in | ORKAnswerFormat.h ORKAnswerFormat.m |
Overview
The ORKTimeOfDayAnswerFormat
class represents the answer format for questions that require users
to enter a time of day.
A time of day answer format produces an ORKTimeOfDayQuestionResult
object.
Other Methods
– initWithDefaultComponents:
Returns an initialized time of day answer format using the specified default value.
- (instancetype)initWithDefaultComponents:(nullable NSDateComponents *)defaultComponents
Parameters
defaultComponents |
The default value with which to configure the picker. |
---|
Return Value
An initialized time of day answer format.
Discussion
This method is the designated initializer.
Declared In
ORKAnswerFormat.h
defaultComponents
The default time of day to display in the picker. (read-only)
@property (nonatomic, copy, readonly, nullable) NSDateComponents *defaultComponents
Discussion
Note that both the hour and minute components are observed. If the value of this property is nil
,
the picker displays the current time of day.
Declared In
ORKAnswerFormat.h
Other Methods
– questionType
The type of question. (read-only)
- (ORKQuestionType)questionType
Discussion
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