When a segmented control is selected, how do I determine which segment was selected?
It looks like I can use
to register another object to watch my segmented control but I don't see how I can get it to recognize which segment got selected.
Edit: Wait... no...
I made an IBAction for my controller... and I connected the Segment Control's "Value Changed" event to my action. Now how do I figure out what the value changed to?
It looks like I can use
Code:
[segmentedControl addTarget:self
action:@selector(action:)
forControlEvents:UIControlEventValueChanged];
to register another object to watch my segmented control but I don't see how I can get it to recognize which segment got selected.
Edit: Wait... no...
I made an IBAction for my controller... and I connected the Segment Control's "Value Changed" event to my action. Now how do I figure out what the value changed to?