ORKTimeIntervalAnswerFormat Class Reference

Inherits from ORKAnswerFormat : NSObject
Declared in ORKAnswerFormat.h

The ORKTimeIntervalAnswerFormat class represents the answer format for questions that ask users to specify a time interval.

The time interval answer format is suitable for time intervals up to 24 hours. If you need to track time intervals of longer duration, use a different answer format, such as ORKValuePickerAnswerFormat.

Note that the time interval answer format does not support the selection of 0.

A time interval answer format produces an ORKTimeIntervalQuestionResult object.

– initWithDefaultInterval:step:

Returns an initialized time interval answer format using the specified default interval and step value.

- (instancetype)initWithDefaultInterval:(NSTimeInterval)defaultInterval step:(NSInteger)step

Parameters

defaultInterval

The default value to display in the picker.

step

The step in the interval, in minutes. The value of this parameter must be between 1 and 30.

Return Value

An initialized time interval answer format.

Discussion

This method is the designated initializer.

Declared In

ORKAnswerFormat.h

  defaultInterval

The initial time interval displayed in the picker.

@property (readonly) NSTimeInterval defaultInterval

Declared In

ORKAnswerFormat.h

  step

The size of the allowed step in the interval, in minutes.

@property (readonly) NSInteger step

Discussion

By default, the value of this property is 1. The minimum value is 1, and the maximum value is 30.

Declared In

ORKAnswerFormat.h