From 3b5b03a3689f7185e1811b9525afee1ead5ec086 Mon Sep 17 00:00:00 2001 From: Xi Zhang Date: Wed, 17 Jul 2024 10:23:50 -0400 Subject: [PATCH] Fix the showing issue when percent is 100%. --- MVMCoreUI/Atomic/Atoms/Views/CircularProgressBar.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MVMCoreUI/Atomic/Atoms/Views/CircularProgressBar.swift b/MVMCoreUI/Atomic/Atoms/Views/CircularProgressBar.swift index f55e85c8..09009a57 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CircularProgressBar.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CircularProgressBar.swift @@ -102,7 +102,7 @@ import UIKit private func showProgressPercentage() { let percent = graphModel?.percent ?? 0 - let percentLen = percent > 9 ? 2 : 1 + let percentLen = String(percent).count // configure attributed string for progress percentage. let attributedString = NSMutableAttributedString(string: String(percent) + "%")