…errors: XYPieChart.m:444:22: Implicit conversion of C pointer type 'CGPathRef' (aka 'const struct CGPath *') to Objective-C pointer type 'NSString *' requires a bridged cast XYPieChart.m:444:22: Incompatible pointer types sending 'CGPathRef' (aka 'const struct CGPath *') to parameter of type 'NSString *' This seems to fix it
…lready running, the pie chart could end up having empty segments. For example, if I went from a chart with 3 segments, and quickly changed to a chart that had 1 segment -then back to the three segments again, it would draw the three segment chart with only 1 segment. The other two segments would be empty spaces. I can only assume this must be because the layersToRemove variable is getting changed in between the time of the CATransaction committing and the completion block happening. I have moved the code that was in the completion block to the end of the CATransaction (after some code that seems to already be doing some cleanup work using layersToRemove), and this seems to fix the problem. Presumably because it is all within the scope of the transaction now. You now seem to be able to call reloadData as many times and as quickly as you like and it works ok.
Run the animation timer on the main thread. We want to allow the user to interact with the UI while this timer is running. If we run it on this thread, the timer will be halted while the user is touching the screen (that's why the chart was disappearing in our collection view).
…in reloadData is over released.
…ced with the real percentage)