# OptionItemSpec

    open class OptionItemSpec : NSObject

The helper class to make option items.

### Properties

- `title`

  The optional title assigned to a single choice option item.

  Important

  This property is used only for a `SingleChoiceOptionItem`.

  #### Declaration

  Swift

      public private(set) var title: String?

- `inputHelper`

  The input helper object assigned to a numeric option item.

  Important

  This property is used only for a `NumericOptionItem`.

  #### Declaration

  Swift

      public private(set) var inputHelper: NumericOptionItemInputHelper?

- `type`

  The type of the option item.

  #### Declaration

  Swift

      public private(set) var type: OptionItem.ItemType

- `labels`

  The labels which are displayed.

  #### Declaration

  Swift

      public private(set) var labels: [String]

- `id`

  The id of the option item.

  #### Declaration

  Swift

      public private(set) var id: Int

### Public

- `makeBooleanOptionItem(label:id:)`

  Makes an option item spec configured for a Boolean option item.

  #### Declaration

  Swift

      public static func makeBooleanOptionItem(label: String, id: Int = 0) -> OptionItemSpec

  #### Parameters

  `label` | The string to be displayed.
  `id` | The optional id of the option item.

  #### Return Value

  An `OptionItemSpec` instance created based on the parameter.

- `makeMultipleChoiceOptionItem(labels:id:)`

  Makes an option item spec configured for a multiple choice option item.

  #### Declaration

  Swift

      public static func makeMultipleChoiceOptionItem(labels: [String], id: Int = 0) -> OptionItemSpec

  #### Parameters

  `labels` | The strings to be displayed.
  `id` | The optional id of the option item.

  #### Return Value

  An `OptionItemSpec` instance created based on the parameter.

- `makeNumericOptionItem(label:inputHelper:id:)`

  Makes an option item spec configured for a numeric option item.

  Important

  By default the button is titled Set which is localized.

  #### Declaration

  Swift

      public static func makeNumericOptionItem(label: String, inputHelper: NumericOptionItemInputHelper, id: Int = 0) -> OptionItemSpec

  #### Parameters

  `label` | The string to be displayed.
  `inputHelper` | Provides all the input related helper parameters.
  `id` | The optional id of the option item.

  #### Return Value

  An `OptionItemSpec` instance created based on the parameters.

- `makeSingleChoiceOptionItem(title:labels:id:)`

  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) -> OptionItemSpec

  #### Parameters

  `title` | The optional title provided for the item
  `labels` | The strings to be displayed.
  `id` | The optional id of the option item.

  #### Return Value

  An `OptionItemSpec` instance created based on the parameters.

- `makeOptionItem()`

  Makes an option item out of the option item spec.

  #### Declaration

  Swift

      public func makeOptionItem() -> OptionItem

  #### Return Value

  OptionItem instance created based on this spec.