StoryPollComponent
@objc(StoryPollComponent)
public final class StoryPollComponent : StoryComponent
This class represents the Poll component.
-
Title of the poll if exists
Declaration
Swift
@objc public let title: String
-
List of options in the poll
Declaration
Swift
@objc public let options: [String]
-
Option index that the user selected
Declaration
Swift
@objc public let selectedOptionIndex: Int
-
StoryPollComponent initialization
Declaration
Swift
@objc public init(id: String, title: String, options: [String], selectedOptionIndex: Int, customPayload: String?)
Parameters
id
Id of the interactive component
title
Title of the poll if exists
options
List of options in the poll
selectedOptionIndex
Option index that the user selected
customPayload
Custom payload for this poll if exists