我有一个UISegmentedControl,它的"Value changed"事件在Interface Builder中连接起来调用我的控制器 -(IBAction)segmentChangeAction:(id)sender;
当用户点击控件以更改所选的段时,segmentChangeAction无论是在iOS4还是iOS5中,都会调用所需的段.
当我以编程方式更改所选的段时segmentedControl.selectedSegmentIndex = newIndex;,在iOS4 segmentChangeAction上调用并且该段反映新的选择.但是在iOS5 segmentChangeAction上没有被调用,但该段确实反映了新的选择.
这是iOS5的变化吗?segmentChangeAction当我以编程方式更改选择时,有什么办法可以在iOS5上调用吗?