相关疑难解决方法(0)

UISegmentedControl更改事件未在iOS5中触发

我有一个UISegmentedControl,它的"Value changed"事件在Interface Builder中连接起来调用我的控制器 -(IBAction)segmentChangeAction:(id)sender;

当用户点击控件以更改所选的段时,segmentChangeAction无论是在iOS4还是iOS5中,都会调用所需的段.

当我以编程方式更改所选的段时segmentedControl.selectedSegmentIndex = newIndex;,在iOS4 segmentChangeAction上调用并且该段反映新的选择.但是在iOS5 segmentChangeAction没有被调用,但该段确实反映了新的选择.

这是iOS5的变化吗?segmentChangeAction当我以编程方式更改选择时,有什么办法可以在iOS5上调用吗?

iphone uisegmentedcontrol ios ios5

36
推荐指数
2
解决办法
2万
查看次数

标签 统计

ios ×1

ios5 ×1

iphone ×1

uisegmentedcontrol ×1