ORKDateAnswerFormat Class Reference
| Inherits from | ORKAnswerFormat : NSObject |
|---|---|
| Declared in | ORKAnswerFormat.h ORKAnswerFormat.m |
Overview
The ORKDateAnswerFormat class represents the answer format for questions that require users
to enter a date, or a date and time.
A date answer format produces an ORKDateQuestionResult object.
Other Methods
– initWithStyle:defaultDate:minimumDate:maximumDate:calendar:
Returns an initialized date answer format using the specified answer style and default date values.
- (instancetype)initWithStyle:(ORKDateAnswerStyle)style defaultDate:(nullable NSDate *)defaultDate minimumDate:(nullable NSDate *)minimumDate maximumDate:(nullable NSDate *)maximumDate calendar:(nullable NSCalendar *)calendarParameters
style |
The style of date answer, such as date, or date and time. |
|---|---|
defaultDate |
The default date to display. When the value of this parameter is |
minimumDate |
The minimum date that is accessible in the picker. If the value of this
parameter is |
maximumDate |
The maximum date that is accessible in the picker. If the value of this
parameter is |
calendar |
The calendar to use. If the value of this parameter is |
Return Value
An initialized date answer format.
Discussion
This method is the designated initializer.
Declared In
ORKAnswerFormat.h
style
The style of date entry.
@property (readonly) ORKDateAnswerStyle styleDeclared In
ORKAnswerFormat.h
defaultDate
The date to use as the default.
@property (copy, readonly, nullable) NSDate *defaultDateDiscussion
The date is displayed in the user’s time zone.
When the value of this property is nil, the current time is used as the default.
Declared In
ORKAnswerFormat.h
minimumDate
The minimum allowed date.
@property (copy, readonly, nullable) NSDate *minimumDateDiscussion
When the value of this property is nil, there is no minimum.
Declared In
ORKAnswerFormat.h
maximumDate
The maximum allowed date.
@property (copy, readonly, nullable) NSDate *maximumDateDiscussion
When the value of this property is nil, there is no maximum.
Declared In
ORKAnswerFormat.h
calendar
The calendar to use in the picker.
@property (copy, readonly, nullable) NSCalendar *calendarDiscussion
When the value of this property is nil, the picker uses the default calendar for the current
locale.
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