Closed AnthoPakPak closed 6 years ago
I've found that the issue had already been solved here PR, but changes had not been reported in Cocoapods version.
But I've made a fix to get expected behavior :
replace
NSInteger *selectedIndex = [self.segment selectedSegmentIndex];
with
NSInteger selectedIndex = [self.segment selectedSegmentIndex];
AND
replace
if (selectedIndex || selectedIndex == 0)
with
if (selectedIndex && selectedIndex != UISegmentedControlNoSegment)
I see, time to publish a new version then :)
Hi,
I've just tried to use the library but I encounter a bug with segment. I've bind a Show target on a specific value of the segment, and a Hide one on others. Whenever I click on the value with the Show target, the value get instantly unselected (it looks like it deselect when the Show has completed). The target field is correctly shown, but the clicked segment value get deselected. If I click a second time on the same value (so no target has to be performed), the value stay correctly selected.
I've tried several workarounds to reselect the value but none of them worked, for example :
Here is my json file :
If anyone has an idea to help, I would be really thankful :)