Help with xCode 6 Soundboard App

Discussion in 'iOS Programming' started by LegendaryW33nie, Apr 4, 2015.

  1. LegendaryW33nie macrumors newbie

    Mar 4, 2014

    I am trying to develop a soundboard application for iOS and have been getting myself familiar with xCode and Swift for around 2 months now. I've just started to create my own application and have come across a little problem. From the image below, I believe all my code is correctly referenced right now I just don't know how to play the sound when the button is tapped. Any help is appreciated.


    (Go easy on me if it looks really bad, I'm new :))

    Attached Files:

  2. Zelda macrumors member

    Aug 10, 2014
    Your button method is empty i.e.
    @IBAction func introTapped(sender: UIButton ) {
    [COLOR="Red"]You need some code here to play the sound[/COLOR] 
  3. LegendaryW33nie, Apr 5, 2015
    Last edited by a moderator: Apr 6, 2015

    LegendaryW33nie thread starter macrumors newbie

    Mar 4, 2014
    What kind of code would I put there though? I have tried something like

    if (self.flipSoundPlayer != nil) {
    but that doesn't work, no sound plays at all. I don't know the right format to put there to get the sound to play
  4. impossiballs, Apr 9, 2015
    Last edited: Apr 9, 2015

    impossiballs macrumors newbie


    Apr 8, 2015
    What is self.flipSoundPlayer ? According to your first attachment shouldn't that be self.intro?

Share This Page