Search code examples
iosswiftuipickerview

Swift UIPickerView disable component


I'm having following UI: enter image description here

Is it possible to disable only the last two components if the switch is used? If so, how can I do this?


Solution

  • You can not disable the components. However you can reload picker using reloadAllComponents method and you should reload only required components. Do not load time components.