How To Make UISlider match Audio progress
问题 I am creating a simple music app, and I was wondering how I can make a UiSlider to follow the progress of a audio file. Here's my project so far: Code: import UIKit import AVFoundation class SongDetailViewController: UITableViewController { var audioPlayer = AVAudioPlayer() override func viewDidLoad() { super.viewDidLoad() do { audioPlayer = try AVAudioPlayer(contentsOf: URL.init(fileURLWithPath: Bundle.main.path(forResource: "Song Name", ofType: "mp3")!)) audioPlayer.prepareToPlay() var