Merge branch 'bugfix/progress_bar_double_issue' into 'develop'

progress bar percentage type fix from Float to Double

See merge request BPHV_MIPS/mvm_core_ui!203
This commit is contained in:
Pan, Xinlei (Ryan) 2019-12-19 10:14:30 -05:00
commit 2a5219f5b6

View File

@ -54,8 +54,9 @@ import Foundation
if let thickness = json?.optionalCGFloatForKey("thickness") {
self.thickness = thickness
}
if let percentage = json?["percent"] as? Float {
progress = percentage/100.0
// as? Float returns nil, apple defect.
if let percentage = json?["percent"] as? CGFloat {
progress = Float(percentage/100.0)
}
if let progressColor = json?.optionalStringForKey("progressColor") {
progressTintColor = UIColor.mfGet(forHex: progressColor)