hello all assume u r write a code for a piano instrument. Is a good way to make for every button IBAction or all buttons in one function return the sound clicked by the user
thanks all
hello all assume u r write a code for a piano instrument. Is a good way to make for every button IBAction or all buttons in one function return the sound clicked by the user
thanks all
It would be much easier to maintain by going with the latter: having all of the buttons point to one IBAction
, and the IBAction
plays a given note based on which button was pressed rather than having a one-for-one relationship between buttons and IBActions
.