progress bar percentage is been treated as Double for two decimal places(Like 54.17) in iOS JSON object, due to that progress percentage is not shown, where as working on Android.
So, changing Float to Double.
This commit is contained in:
parent
6cc31113f7
commit
95c528b658
@ -54,8 +54,8 @@ import Foundation
|
||||
if let thickness = json?.optionalCGFloatForKey("thickness") {
|
||||
self.thickness = thickness
|
||||
}
|
||||
if let percentage = json?["percent"] as? Float {
|
||||
progress = percentage/100.0
|
||||
if let percentage = json?["percent"] as? Double {
|
||||
progress = Float(percentage/100.0)
|
||||
}
|
||||
if let progressColor = json?.optionalStringForKey("progressColor") {
|
||||
progressTintColor = UIColor.mfGet(forHex: progressColor)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user