VerticalFeedImageQuizComponent
@objc(VerticalFeedImageQuizComponent)
public final class VerticalFeedImageQuizComponent : VerticalFeedItemComponent
This class represents the Image Quiz component.
-
Title of the image quiz if exists
Declaration
Swift
@objc public let title: String
-
List of texts of the options if exists, otherwise list of image urls of image quiz
Declaration
Swift
@objc public let options: [String]?
-
Index of the right answer if exists
Declaration
Swift
@objc public let rightAnswerIndex: NSNumber?
-
Option index that the user selected
Declaration
Swift
@objc public let selectedOptionIndex: Int
-
Custom payload for this image quiz if exists
Declaration
Swift
@objc public let customPayload: String?
-
VerticalFeedImageQuizComponent initialization
Declaration
Swift
@objc public init(id: String, title: String, options: [String]?, rightAnswerIndex: NSNumber?, selectedOptionIndex: Int, customPayload: String?)
Parameters
id
Id of the interactive component
title
Title of the image quiz if exists
options
List of texts of the options if exists, otherwise list of image urls of image quiz
rightAnswerIndex
Index of the right answer if exists
selectedOptionIndex
Option index that the user selected
customPayload
Custom payload for this image quiz if exists