CALayer frame origin.y upside down, 0 is at the bottom?

When I add a frameset to CALayer, the origin. Conversely, 0 is at the bottom of this superlayer and origin.y increases. It moves it in its super layer. Is there something I did to make him roll over? I would expect origin.y = 0 to be the top, not the bottom.

Thanks,

+4
source share
1 answer

You can flip the coordinate system to behave like iOS, like this ...

layer.sublayerTransform = CATransform3DMakeScale(1.0f, -1.0f, 1.0f); 
+8
source

Source: https://habr.com/ru/post/1342075/


All Articles