Button Toggle Music

Using AVAudioPlayer toggle the music player on button tap

if(audioPlayer.isPlaying){
[audioPlayer stop];
audioPlayer = nil;
}else{
// initialize audio player and play
}