SJFluidSegmentedControl icon indicating copy to clipboard operation
SJFluidSegmentedControl copied to clipboard

Segmented control tend to be different when landscape mode.

Open andrewlim7 opened this issue 7 years ago • 1 comments

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

andrewlim7 avatar Aug 28 '17 09:08 andrewlim7

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.

guidove avatar Oct 14 '17 05:10 guidove