When you rotate the smartphone, the rectangular UIView frame rotates and scales simultaneously on the screen. It is known that after transformations, it becomes difficult to deal with the frame property due to the fact that despite the frame dimensions that we see on the screen, frame dimensions are completely different, namely, the most extreme points for describing a rectangle into it. How can I find the real width and height after transformation?

  • you still torment your transform: (this is all done with sines and cosines - Max Mikheyenko
  • Frankly speaking, in mathematics is not strong, here I am torturing Transform - gadjetmans
  • I threw off the code in your previous question. can help - Max Mikheyenko
  • If I understand you correctly, try using the properties of the layer. Frame does not always match the position of the layer. Try [myView.layer.presentationLayer frame] - Vitali Eller

1 answer 1

You need view.bounds.width, view.bounds.height bounds vs frame