0

I don't want to use a uislider, instead I want to use a progress view to show the progress of the song completed, just like spotify on the bottom.

@IBOutlet weak var progressbar: UIProgressView!

func playSong(){
self.player = AVPlayer(URL: NSURL(string: url)!)
        print(url)
        print("time \(CMTimeGetSeconds((self.player.currentItem?.asset.duration)!))") //I Get the correct time printed

        self.player.volume = 1.0
        self.player.rate = 1.0
        self.player.play()

}
user6032625
  • 197
  • 1
  • 2
  • 14

1 Answers1

0

Then you need to use progress view instead of slider. You can start from here.

Here is nice objective-c framework for the progress bars.

Ramis
  • 13,985
  • 7
  • 81
  • 100