What code do I use to determine if the iPhone ringer is on or off?
The application that I create plays music in the background, if the iphone ringer switch is off, then I want the music to stop playing.
My question is similar to this, but I want to get an answer in fast and iOS8 ...
Silent Mode Detection in iOS 7
code:
if iphoneRinger == On { self.playmusic() } else { self.stopmusic() }
source share