swift - Thread 1: EXC_BAD_ACCESS (code=1, address = 0x38) -
in view controller have action method button. in body of method says
if audioplayer.playing { audioplayer.stop }
when audio player playing, works. when audio player not playing crash error. i'm literally losing sanity me please love of god.
try stop player:
@ibaction func stoptapped(sender: anyobject) { if let player = audioplayer{ player.stop() } }
for more info check this sample project.
Comments
Post a Comment