开发者

How to create a piano-style interface on an iPhone? [duplicate]

This question already has answers here: How to create piano UI in iPhone? [closed] (5 answers) Closed 6 years ago.

Assume you are writing a code for a piano instrument. Is a good way to make for every button IBAction or all buttons i开发者_StackOverflow中文版n one function return the sound clicked by the user?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜