Justin808 Justin808 - 3 months ago 18
Objective-C Question

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

When I Add a set the fram on a CALayer the origin.y is reversed, 0 is at the bottom of it super layer and increasing origin.y moves it up in its super layer. Is there something I did to cause this to be flipped? I would expect origin.y=0 to be the top, not the bottom.

Thanks,

Answer

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

layer.sublayerTransform = CATransform3DMakeScale(1.0f, -1.0f, 1.0f);
Comments