After completed the Full audio handle the Audio player iOS Swift


After audio finished playing we want to set all the player settings to default.So we will call the audioPlayerDidFinishPlaying method in the class.

Code:
    func audioPlayerDidFinishPlaying(_ player: AVAudioPlayer!, successfully flag: Bool) {
        let view = progress.superview!
        audioPlayBtn.isSelected = false
        progress.value = 0.0
        player.pause()
        updater.invalidate() // updater for the slider play
    }

Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Saved Image in document directory and save path in coredata not able to fetch the image file iOS swift