I know how to get the distance between two points in swift. But I want to know how to get the distance between two anchors as a CGFloat.
For example: I want to find the distance between the
view.topAnchor
and the
button.topAnchor
on a view controller like this:
I'm guessing I will have to get a CGPoint of the anchors (then I can just find the difference between the y points of the CGPoint's). I just don't know how to do that.