开发者

Objective-C and Interfacebuilder with Audio

I want to make an a开发者_如何学Gopp that has buttons that when pressed, plays a sound. How would I add the sounds, and then use the Line thing in IB to connect them to a button?


It sounds like you're fairly new to this, so I would suggest you start with a simple example like this:

http://www.youtube.com/watch?v=47c1dIN5NgQ

Once you get a little more advanced, you can setup an array of either UIButtons or UIImages on a view (or scrollview) and play sounds based on their tag or some name in array. Or you can stick with the simple method of just laying out UIButtons on a view and hooking up each individually to a specific sound.

There are plenty of tutorials though, so just search for "playing sounds with avaudioplayer" on google or here on stackoverflow

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜