Skip to content

Commit

Permalink
Update the demo app to use togglePlaying function
Browse files Browse the repository at this point in the history
  • Loading branch information
fethica committed Dec 23, 2017
1 parent cbe7078 commit e4c7851
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Example/FRadioPlayer/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class ViewController: UIViewController {
}

@IBAction func playTap(_ sender: Any) {
togglePlaying()
player.togglePlaying()
}

@IBAction func stopTap(_ sender: Any) {
Expand All @@ -95,10 +95,6 @@ class ViewController: UIViewController {
next()
}

func togglePlaying() {
playButton.isSelected ? player.pause() : player.play()
}

func next() {
selectedIndex += 1
}
Expand Down

0 comments on commit e4c7851

Please sign in to comment.