ORKTextChoiceAnswerFormat Class Reference

Inherits from ORKAnswerFormat : NSObject
Declared in ORKAnswerFormat.h

The ORKTextChoiceAnswerFormat class represents an answer format that lets participants choose from a fixed set of text choices in a multiple or single choice question.

The text choices are presented in a table view, using one row for each answer. The text for each answer is given more prominence than the detailText in the row, but both are shown.

The text choice answer format produces an ORKChoiceQuestionResult object.

– initWithStyle:textChoices:

Returns an initialized text choice answer format using the specified question style and array of text choices.

- (instancetype)initWithStyle:(ORKChoiceAnswerStyle)style textChoices:(NSArray<ORKTextChoice*> *)textChoices

Parameters

style

The style of question, such as single or multiple choice.

textChoices

An array of ORKTextChoice objects.

Return Value

An initialized text choice answer format.

Declared In

ORKAnswerFormat.h

  style

The style of the question (that is, single or multiple choice).

@property (readonly) ORKChoiceAnswerStyle style

Declared In

ORKAnswerFormat.h

  textChoices

An array of ORKTextChoice objects that represent the choices that are displayed to participants.

@property (copy, readonly) NSArray<ORKTextChoice*> *textChoices

Discussion

The choices are presented as a table view, using one row for each answer. The text for each answer is given more prominence than the detailText in the row, but both are shown.

Declared In

ORKAnswerFormat.h