CAReplicatorLayer random position

600 Views Asked by At

How do you introduce randomness within a CAReplicatorLayer layer? For example, randomizing the positions of each particle.

Best, Vance

1

There are 1 best solutions below

0
adam On

You must setInstanceTransform:(CATransform3D)transform to each replicated layer.

Use that in conjunction with arc4rand() to randomise the positions..