UISwitch for sound

I created a UISwitch to control the sound. I created it in a view controller named SoundViewController. When I quit the view controller, the sound still playing. That's what I want. But when I open the app, no sound. I turn the switch off and turn it on again then it plays sound. When I turn off the switch, the sound off, and I quit the view controller again and come back, I saw the switch is on but no sound. Anyone please help me? Thanks

UISwitch for sound
 
 
Q