I have a segmented control where the user can select how to order a list. Works fine.
However, I would like that when an already selected segment is tapped, the orde
Based on Bob de Graaf's answer:
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
[self sendActionsForControlEvents:UIControlEventAllTouchEvents];
[super touchesEnded:touches withEvent:event];
}
Note the use of UIControlEventAllTouchEvents instead of UIControlEventValueChanged.
Also there's no need to call -(void)setSelectedSegmentIndex:.