configure IBOutlets for each button, and then check which sender is which button. But the best way to do this is to have IBActions for each button run, then they can call the method with BOOL or enum, telling about the method, how to behave, or do some other type of processing on their own and call the method that does the general code.
source share