2

I have a simple UIImageView of in my screen as follow:

To get the co-ordinates of highlighted corner of this UIImageView, I use simple formula:

CGPointMake(CGRectGetMaxX(imageView.frame), CGRectGetMaxY(imageView.frame))

Now I rotate this imageView and it looks as follows:

After this rotation, how can I get the co-ordinates of this highlighted point? Because after rotation, the previous code is not applicable.

Rohan Sanap
  • 2,773
  • 2
  • 21
  • 39

1 Answers1

1

You can consult the next link topic: Transformation of Coordinates Involving Rotation

https://www.math10.com/en/geometry/analytic-geometry/geometry1/coordinates-transformation.html

It only applies cos and sin functions to calculate (x,y) in the new rotated coordinate system. All you need is the rotation angle.

Edder Núñez
  • 165
  • 2
  • 8