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

Segmented control tend to be different when landscape mode. #11

Open
andrewlim7 opened this issue Aug 28, 2017 · 1 comment
Open

Segmented control tend to be different when landscape mode. #11

andrewlim7 opened this issue Aug 28, 2017 · 1 comment

Comments

@andrewlim7
Copy link

Hi, the fluid in selectedIndex when in portrait mode and landscape mode are not the same.

@guidove
Copy link

guidove commented Oct 14, 2017

I have the same problem. Was able to workaround it by observing rotation changes (UIDeviceOrientationDidChange) and doing this when change detected:

segControl.reloadData()
let idx = segControl.currentSegment
segControl.setCurrentSegmentIndex(1, animated: false)
segControl.setCurrentSegmentIndex(idx, animated: true)

It's a dirty workaround, but it does the trick for now.

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