I have a weird problem with UISegmentedControl.
I’m setting the selected segment index by using the method:
[self.toolbarSegmentedControl setSelectedSegmentIndex:0];
So the problem is – the click handler:
- (IBAction)segmentedControlClick:(id)sender
is not called in simulator but under device it IS called when passing this method. Why so and where is the wrong and right behavoir?
Perhaps the iOS version on your device is different to that of your simulator.
The behaviour of
setSelectedSegmentIndexhas changed in iOS5 — specifically,segmentChangeActionis no longer called as a result. See this other Stack Overflow question for details.