Reputation: 86155
There are predefined methods converting coordinates between
UIView
<-> UIWindow
UIWindow
<-> UIScreen
How about UIView
<-> UIScreen
? Is there predefined method in UIKit
? I can make my own, however I want to use if there is predefined one.
Upvotes: 2
Views: 1877
Reputation: 94844
Yes, UIView has the conventiently-named convertRect:toView:
and convertRect:fromView:
methods. See the documentation for details.
Note that [A convertRect:rect fromView:B]
and [B convertRect:rect toView:A]
are basically equivalent, unless A or B is nil.
Upvotes: 1