title: How to use audioPlayerDidFinishPlaying multiple times
body: <p>I created the UIButton with an image on the MainStoryBoard. When I press that button it plays an audio file and while the audio is playing the background color of UIButton changes.</p>
  
  <p>audioPlayerDidFinishPlaying1 is properly called, however audioPlayerDidFinishPlaying2　seems not be called. I appreciate any advise that lead me to solve this problem.</p>
  
  <pre><code>    let url1 = Bundle.main.bundleURL.appendingPathComponent("music1.mp3")
      let url2 = Bundle.main.bundleURL.appendingPathComponent("music2.mp3")
  
      @IBOutlet weak var yourButton: CustomButton!
      @IBOutlet weak var yourButton2: CustomButton! 
  
     func Player(url: URL) {
          do {
              try player = AVAudioPlayer(contentsOf:url)
              player.play()
              yourButton.isSelected = true
              player.delegate = self
          } catch {
              print(error)
          }
      }
  
      func Player1(url: URL) {
          do {
              try player = AVAudioPlayer(contentsOf:url)
              player.play()
              yourButton2.isSelected = true
              player.delegate = self
          } catch {
              print(error)
          }
      }
      @IBAction func pushButton1(sender: UIButton) {
          Player(url: url1)
      }
      func audioPlayerDidFinishPlaying(_ player: AVAudioPlayer, successfully flag: Bool) {
          yourButton.isSelected = false
  
      }
  
      @IBAction func pushButton2(sender: UIButton) {
          Player1(url: url2)
      }
      func audioPlayerDidFinishPlaying2(_ player: AVAudioPlayer, successfully flag: Bool) {
          yourButton2.isSelected = false
      }
  </code></pre>