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:

Returns an initialized date answer format using the specified date style.

- (instancetype)initWithStyle:(ORKDateAnswerStyle)style

Parameters

style

The style of date answer, such as date, or date and time.

Return Value

An initialized date answer format.

Declared In

ORKAnswerFormat.h

– 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 nil, the picker displays the current time.

minimumDate

The minimum date that is accessible in the picker. If the value of this parameter is nil, there is no minimum.

maximumDate

The maximum date that is accessible in the picker. If the value of this parameter is nil, there is no maximum.

calendar

The calendar to use. If the value of this parameter is nil, the picker uses the default calendar for the current locale.

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