minorblend
minorblend

Reputation: 935

How to improve performance of CALayer animations?

while studying Core Animation, I've made a UIView category which makes a subview be broken into a lot of tiles and diffused. https://github.com/minorblend/HNTileDisappear However, when the number of tiles are not small FPS of animation drops steeply. Is there any way or idea to improve the performance of this kind of CALayer animation?

Upvotes: 2

Views: 1678

Answers (1)

TotoroTotoro
TotoroTotoro

Reputation: 17612

A few things come to mind:

1) set shouldRasterize to YES on your layers

2) don't use fractional values in frames if you can

3) make your layers opaque

4) try also setting the drawsAsynchronously property on the layers

Upvotes: 2

Related Questions