Open PrashantKT opened 6 years ago
I think it is possible that in your project there is a big function that takes time the time is over
la solution
DispatchQueue.main.async(execute: {() -> Void in
self.animate(xAxisDuration: 2.0, yAxisDuration: 2.0, easingOption: .easeInBack)
})
I think so,
for j in 0 ..< Int(ceil(Double(dataSet.entryCount) * animator.phaseX))
change for
for j in stride(from: 0, to: Int(ceil(Double(dataSet.entryCount) * animator.phaseX)), by: 1)
@PrashantKT I have the same issue and the snippet that @txoan have posted is working, but it would be great if anyone can check if the solution doesn't introduce new bugs or any other problem. @jjatie @liuxuan30
I have extension extension
And app crashes here
for j in 0 ..< Int(ceil(Double(dataSet.entryCount) * animator.phaseX)) // Crash here { guard let e = dataSet.entryForIndex(j) as? BarChartDataEntry else { continue }
(lldb) po dataSet.entryCount 12
(lldb) po animator.phaseX -0.085005447941268492
Please solve this issue