I have an app which updates a BLE device using iOSDFULibrary.
I have this function:
func dfuProgressDidChange(for part: Int, outOf totalParts: Int, to progress: Int, currentSpeedBytesPerSecond: Double, avgSpeedBytesPerSecond: Double) {
print("\t\(part)\t\(totalParts)\t\(progress)\t\(currentSpeedBytesPerSecond)\t\(avgSpeedBytesPerSecond)")
}
When the update is going on, I want my UIProgressView to move accordingly progress
and be filled fully when the progress reaches 100.
What I have so far is:
@IBOutlet weak var progressView: UIProgressView!
progressView.progressViewStyle = .default
progressView.tintColor = .orange
progressView.progressTintColor = .orange
progressView.backgroundColor = .none
progressView.progress = Float(progress)
progressView.setProgress(100.0, animated: true)