I am trying to create a sound when A button is pressed in Swift. Since I do not know how to do that I am following answers regarding that subject on stack overflow. Unfortunately all answers involve passing nil into a paramter, which I cannot do in Swift 2.0. Here is example code of how they play sound when a button is pressed.
Swift, how to play sound when press a button
As you can see answers involve passing nil as an argument into a parameter when initializing the audio player object.
Is there anyway around this?