gpt4 book ai didi

ios - 如何在没有 uislider 的情况下显示流的进度?

转载 作者:行者123 更新时间:2023-11-30 13:34:34 25 4
gpt4 key购买 nike

我不想使用uislider,而是想使用进度 View 来显示歌曲完成的进度,就像底部的Spotify一样。

@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()

}

最佳答案

那么您需要使用进度 View 而不是 slider 。您可以从here开始.

Here是一个很好的用于进度条的 Objective-C 框架。

关于ios - 如何在没有 uislider 的情况下显示流的进度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36225831/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com