I decided to make a mirror image in the upper half of the screen of the UILabel instance, which is in the lower half of the screen. And I can not understand how! Will help !!

That is, I need to turn a UILabel upside down so that the text is displayed upside down

  • one
  • turn to stekoflou flou, and ts need to reflect the text, it cannot be done through CGAffineTransformMakeRotation - aknew
  • Yes you are right. This I plyusanul, not really looking! - Stanislav Pankevich pm
  • one
    Well then CGAffineTransformMakeScale - VladD
  • Yes, for mirroring, I used CGAffineTransformMakeScale with QuartzCore.framework; and to rotate 180 degrees - CGAffineTransformMakeRotation! for beginners like me - I will add that the angle is indicated in radians) Thank you all! - pupkinn

2 answers 2

I don’t have a poppy on hand right now to check, but as far as I remember it can be done by assigning CATransform3DMakeRotation(M_PI,1,0,0) (rotate 180 degrees around x, function description ) in label.layer.transform , just quartzcore do not forget to plug.

Although I have to admit that I have a feeling that it would be more correct to reflect the whole half of the screen as a whole, rather than elementwise, but I cannot call the mechanism straight off as if it could be done if you only drive the entire half of the screen into a separate class and draw two views - normal and mirrored, or draw the upper half layer a second time through the renderInContext from the bottom with rotation

  • thanks, everything worked out) - pupkinn

the solution, like, turn over, already wrote @ aknew so that you can turn half of the screen, you can put two views, one - the top half of the screen, the bottom - the bottom one, filled with content. Flip the top, reading from the bottom of the content. Well, if you need it.