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

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift