RadioButtonElement class is utilised to create a single selection input element in a user interface.
Parameters
Class Usage
Here’s how to create an instance of theRadioButtonElement class:
- Swift
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
RadioButtonElement class is utilised to create a single selection input element in a user interface.
| Name | Type | Description |
|---|---|---|
| elementId | string | Used to set a unique ID for the element |
| label | string | Used to set a label for the element |
| options | [OptionElement] | Used to set options for the element |
| optional | bool | Used to set an optional flag for the element |
| defaultValue | String | Used to set a default value for the element |
RadioButtonElement class:
let optionElement = OptionElement()
optionElement.id = "Male"
otionElement.value = "Male"
let radioButtonElement = RadioButtonElement()
radioButtonElement.elementId = "gender"
radioButtonElement.label = "Gender"
radioButtonElement.options.append(optionElement)
Was this page helpful?