Reading UISegmentedControl ID

I have one UITableView

with about 30 custom cells, each containing UISegmentedControl

. I have linked the event UIControlEventValueChanged

to receive selectedIndex

.

I would also like to get an id UISegmentedControl

to identify it among 30 UISegmentedControls

.

So how can I get the id for the current UISegmentedControl

one that triggered the event? I didn't find the "id" or "name" property for UISegmentedControl

.

Any pointers appreciated.

0


source to share


1 answer


Try using the UISegmentedControl tag property. You can set that integer (in your case, probably 1-30) and access it from the UIControlEventValueChanged action.



+2


source







All Articles