TOSegmentedControl
TOSegmentedControl copied to clipboard
Manually setting `selectedSegmentIndex` doesn't update the UI
It's quite unintuitive (and undocumented) that by doing:
segmentedControl.selectedSegmentIndex = 0
nothing happens in the UI (actually something happens but it's quite glitchy) and the way it works is by doing
segmentedControl.setSelectedSegmentIndex(0, animated: true)
Is this on purpose?
Nope, it's not on purpose.
If we're talking about things being unintuitive, what do you mean by "something happens but it's quite glitchy"? 😜
I thought maybe it was on purpose that's why I made that comment 🙈. So if you do segmentedControl.selectedSegmentIndex = 0 the selectedSegmentedIndex gets changed but it's not shown on the UI (UI doesn't change accordingly)