How do I switch UISegmentedControl
programmatically ?
@jmstone response, true, this action will not invoke the valueChanged event for this control.
One way to overcome this is to just call the function yourself:
segmentedControl.selectedSegmentIndex = 3;
[self valueChangedMethod:segmentedControl];
This will call:
- (void)valueChangedMethod:(UISegmentedControl *)segmentedControl
{
//continue your code here...
}