I read the documentation on CAShapeLayer , but I still do not quite understand. In my opinion, Layer always flat, and its size is always a rectangle.
CAShapeLayer , on the other hand, allows you to define a layer that not only looks like a rectangle. It can be a circle, triangle, etc., while you use it with UIBezierPaths .
Is my understanding here?
What I had in mind was, for example, a tennis ball that bounces off the edges of the screen (simple enough), but I would like to show a little animation that does not use image animation - I would like it to show a little โcompressibleโ like an animation when it hits the edge of the screen and then bounces. I do not use the image of a tennis ball. Just a yellow circle.
Will I fix CAShapeLayer here to accomplish this? If so, can you give an example of litle? Thanks.
source share