Fix the showing issue when percent is 100%.
This commit is contained in:
parent
a845f70b55
commit
3b5b03a368
@ -102,7 +102,7 @@ import UIKit
|
|||||||
private func showProgressPercentage() {
|
private func showProgressPercentage() {
|
||||||
|
|
||||||
let percent = graphModel?.percent ?? 0
|
let percent = graphModel?.percent ?? 0
|
||||||
let percentLen = percent > 9 ? 2 : 1
|
let percentLen = String(percent).count
|
||||||
|
|
||||||
// configure attributed string for progress percentage.
|
// configure attributed string for progress percentage.
|
||||||
let attributedString = NSMutableAttributedString(string: String(percent) + "%")
|
let attributedString = NSMutableAttributedString(string: String(percent) + "%")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user