Hi, I have started learning Swift recently and due to system specifications, I am learning how to build apps for iOS 12.
I have written a code to update UI based on user's click.
Note : This function is called in the IBAction Function
But the progress bar frame is not getting updated. I checked and the value is getting updated but when I check on simulator, the progress bar is not updating, rest all are fine.
Kindly help me out to solve this issue
I have written a code to update UI based on user's click.
Note : This function is called in the IBAction Function
Code Block func updateUI() { //Here i is a global variable scoreLabel.text = "Score : \(score)" progressLabel.text = "Question: \(questionNumber+1) / 13" progressBar.frame.size.width = (CGFloat(view.frame.size.width) / 13) * CGFloat(i) print("i: \(i)") i = i + 1 //CGFloat(allQuestion.list.count) * CGFloat(questionNumber + 1) print(progressBar.frame.size.width) }
But the progress bar frame is not getting updated. I checked and the value is getting updated but when I check on simulator, the progress bar is not updating, rest all are fine.
Kindly help me out to solve this issue