如何更改UICircularProgressRing标签值?

时间:2019-06-18 20:09:34

标签: swift

我正在制作一个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
        }
    }
}

0 个答案:

没有答案