I’m trying link 40 buttons to one event handler method and then do the
processing work from one method instead of 40. I know how to link it
but once I get there I don’t know how to distinguish what button was
pressed. Does anyone know how to reference the button object sender id
or is there another way to solve this problem?
Any help would be greatly appreciated.
I’m trying link 40 buttons to one event handler method and then do the
Share
For understand witch button was pressed you need first to create an IBoutlet into you code for each button and then compare it with
senderjust using the==operator.Example:
Compare: