UISegmentedControl not firing UIControlEventValueChanged when changing selection

Originator:martin
Number:rdar://9695171 Date Originated:29-Jun-2011 09:06 AM
Status:Duplicate/9579268 Resolved:
Product:iPhone SDK Product Version:iOS 5 Beta 2
Classification:Serious Bug Reproducible:Always
 
Summary:

When registering for UIControlEventValueChanged on a UISegmentedControl, the registered selector should be called whenever the selected index of the UISegmentedControl changes - regardless if it's by the user through tapping or by changing the selectedSegmentedIndex property of the control. On iOS 5 however it only gets called when the selection is changed by the user.

Steps to Reproduce:

* Create a UISegmentedControl
* Register a target/selector for UIControlEventValueChanged
* Change the selectedSegmentedIndex of the UISegmentedControl in code

Expected Results:

The registered target/selector receives the UIControlEventValueChanged call

Actual Results:

On iOS 5 nothing happens. Pre-iOS 5 it works.

Comments

The duplicate information seems incorrect. http://www.openradar.me/9579268 seems like a broken link.

By loopwhile1 at Aug. 22, 2011, 10:13 p.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!