Here is my code
@IBOutlet weak var progressBar: UIProgressView!
let progress = Progress(totalUnitCount: 10)
Updating progress bar on a button-click later:
progress.completedUnitCount += 1
let progressFloat = Float(self.progress.fractionCompleted)
self.progressBar.setProgress(progressFloat, animated: true)
The last line of code gives me
Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value
What should I do?