Coordinates in coordinate space?
Each UIView has its own coordinate space. You can refer to the size of the view in your own coordinate space by requesting its bounds .
The size and position of the view in the parent view is called frame . In your example, you request the top left corner of the image in its coordinate space of the parent view.
If this is what you want to do, try the following:
frame.origin.x frame.origin.y frame.size.width frame.size.height
Adding them together, you can get any coordinate: for example, the x coordinate of the upper right will be
frame.origin.x + frame.size.width
Amy worrall
source share