MultipleChoiceSelection
public struct MultipleChoiceSelection : Answer
-
Index representing the selected choice
Declaration
Swift
public let value: Int -
Identifier of the
QuestionDeclaration
Swift
public let questionId: String -
Identifier of the selected
ChoiceDeclaration
Swift
public private(set) var codedValue: String -
Initializes a
MultipleChoiceSelectedgiven the index of the selected choice as well as theQuestionit answers.- value: Index of the selected
Choice question: The
Questionthis answers
Throws
AnswerError.unacceptableif the question is not a multiple choice type or if the index is out of boundsDeclaration
Swift
public init(_ value: Int, question: Question) throwsReturn Value
A
MultipleChoiceSelectionrepresenting anAnswerto a multiple choice type question - value: Index of the selected
MultipleChoiceSelection Structure Reference