How to convert a CGPoint in one UIView to another view using convert()

Each view has its own co-ordinate system, meaning that if I tap a button and ask iOS where I tapped, it will tell me where I tapped relative to the top-left of the button. This is usually what you want, but if you want to translate a position in one view into a position it's easy enough to do.

As an example, this code creates two views, creates a virtual "tap", then converts it from the first view's co-ordinate space to the second's: