我正在制作一个SpeedTest应用,我想将UICircularProgressRing标签值更改为我得到的Mbps。
func downloadMeasurement(_ measurement: NDT7Measurement) {
if let elapsedTime = measurement.elapsed
{
let rounded = Double(Float64(downloadSpeed)/elapsedTime/125000).rounded(toPlaces: 3)
DownloadSPeed.text = "\(rounded) Mbp/s"
PV.startProgress(to: CGFloat(rounded), duration: 1)
{
print("Completed")
// self.PV.value = 1000.0
}
}
}