OptionItemSpec
open class OptionItemSpec : NSObject
The helper class to make option items.
-
The optional title assigned to a single choice option item.
Important
This property is used only for aSingleChoiceOptionItem.Declaration
Swift
public private(set) var title: String? -
The input helper object assigned to a numeric option item.
Important
This property is used only for aNumericOptionItem.Declaration
Swift
public private(set) var inputHelper: NumericOptionItemInputHelper? -
The type of the option item.
Declaration
Swift
public private(set) var type: OptionItem.ItemType -
The labels which are displayed.
Declaration
Swift
public private(set) var labels: [String] -
The id of the option item.
Declaration
Swift
public private(set) var id: Int
-
Makes an option item spec configured for a Boolean option item.
Declaration
Swift
public static func makeBooleanOptionItem(label: String, id: Int = 0) -> OptionItemSpecParameters
labelThe string to be displayed.
idThe optional id of the option item.
Return Value
An
OptionItemSpecinstance created based on the parameter. -
Makes an option item spec configured for a multiple choice option item.
Declaration
Swift
public static func makeMultipleChoiceOptionItem(labels: [String], id: Int = 0) -> OptionItemSpecParameters
labelsThe strings to be displayed.
idThe optional id of the option item.
Return Value
An
OptionItemSpecinstance created based on the parameter. -
Makes an option item spec configured for a numeric option item.
Important
By default the button is titledSet
which is localized.Declaration
Swift
public static func makeNumericOptionItem(label: String, inputHelper: NumericOptionItemInputHelper, id: Int = 0) -> OptionItemSpecParameters
labelThe string to be displayed.
inputHelperProvides all the input related helper parameters.
idThe optional id of the option item.
Return Value
An
OptionItemSpecinstance created based on the parameters. -
Makes an option item spec configured for a single choice option item.
Declaration
Swift
public static func makeSingleChoiceOptionItem(title: String?, labels: [String], id: Int = 0) -> OptionItemSpecParameters
titleThe optional title provided for the item
labelsThe strings to be displayed.
idThe optional id of the option item.
Return Value
An
OptionItemSpecinstance created based on the parameters. -
Makes an option item out of the option item spec.
Declaration
Swift
public func makeOptionItem() -> OptionItemReturn Value
OptionItem instance created based on this spec.
View on GitHub
OptionItemSpec Class Reference