I'm trying slightly different than what the instructor has asked to do -
After pressing the snail button to play the audio slowly, another view controller will show up with a label "Playing slowly" and a stop button.
The action for the stop button in this new view controller is to stop the audio the previous view controller has started.
I did some googling and found the following snipped of code will pass variables from one view controller to another:
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject!) {
if (segue.identifier == "btnSubmitSegue") {
var playslow = segue.destinationViewController as! PlaySlowViewController
playslow.audioPlayer2 = audioPlayer
}
}
When I did this I'm seeing the following error:
Thread 1: EXC_BAD_ADDRESS (code=1, address = 0x38)
I did some googling with this error message and looks like some memory corruption. Has anyone seen this kind of problem and knows how to solve it?