ORKDateAnswerFormat Class Reference
Inherits from | ORKAnswerFormat : NSObject |
---|---|
Declared in | ORKAnswerFormat.h |
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.
– 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 *)calendar
Parameters
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 style
Declared In
ORKAnswerFormat.h
defaultDate
The date to use as the default.
@property (copy, readonly, nullable) NSDate *defaultDate
Discussion
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 *minimumDate
Discussion
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 *maximumDate
Discussion
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 *calendar
Discussion
When the value of this property is nil
, the picker uses the default calendar for the current
locale.
Declared In
ORKAnswerFormat.h