views:

34

answers:

1

I want to make an app 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?

+1  A: 

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

iWasRobbed