Ok, i’m new to the whole GUI programming so this might be a very simple question but has proven difficult to me.
I have an application with 3 buttons. Button A is the main button, it starts and stops the application. I created a class with an IBAction on it and wrote the code for that button. it works. I also have button B and C that are used to set options. I created two IBOutlets: ButtonBAction and ButtonCAction, and control dragged (in interface builder) my class to each button and selected the action.
Now, the idea is that when button B is pressed an option is set, basically an int is set (on the class for button A) to 1. The same with button C. How do I do this? How do I detect that button B or C were clicked and set those ints?
Thanks
You can create another
IBActionofsetOptionWithButton:, both buttons can call this method. Then set the option based on which button was used. You can set an identification value for each button in Interface Builder to make this detection easier.