How do I determine which control fired an event?
Posted
by Daniel I-S
on Stack Overflow
See other posts from Stack Overflow
or by Daniel I-S
Published on 2010-04-10T02:44:22Z
Indexed on
2010/04/10
2:53 UTC
Read the original article
Hit count: 374
I have the Value Changed event of two UISliders (both of which have referencing outlets) wired up to the following method:
-(IBAction) sliderMoved:(id) sender {}
How can I determine which slider was moved so that I can get its value and update the corresponding label? Or would it be simpler to have two separate events, one for each slider? The second option seems like unnecessary replication to me.
Cheers, Dan
© Stack Overflow or respective owner