0

I have a uitableview, where custom tableview cell inserts another uiview subclass to its contentView to display each cell content, I use the views drawRect method to write more than 20 numbers on each cell.

Now I need to animate the color of each numbers depending on whether its value has increased or decreased from its previous value.

I am using CATextLayer for this purpose, so that I can animate the foregroundColor property using CAAnimation. But in this process iOS is trying to trigger almost 400 CAAnimation simultaneously as I have 20 or more rows too. And this is seriously affecting the performance.

I found CAShapeLayer far more heavier for this job.

And moreover when I am using CATextLayer my font looks really jagged, and edgy.

My question is what would be the best method to do such thing.

Does a collection of animations in a CAAnimationGroup run under one thread, actually my point is will it improve the performance if I try to group 20 CAAnimations for a particular row into a CAAnimationGroup, than firing them individually.

rahduro
  • 83
  • 1
  • 7

1 Answers1

0

For one of my requirement i was also requiring animation group and here is the reference: How to animate one image over the unusual curve path in my iPad application?

Hope this will help you out.

Enjoy Coding :)

Community
  • 1
  • 1
Mrunal
  • 13,982
  • 6
  • 52
  • 96