Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually setting selectedSegmentIndex doesn't update the UI #29

Open
DantePuglisi opened this issue Oct 30, 2020 · 2 comments
Open

Manually setting selectedSegmentIndex doesn't update the UI #29

DantePuglisi opened this issue Oct 30, 2020 · 2 comments

Comments

@DantePuglisi
Copy link

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?

@TimOliver
Copy link
Owner

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"? 😜

@DantePuglisi
Copy link
Author

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants