convert(_:to:)
Converts a rectangle from the receiver’s coordinate system to that of another view.
Declaration
func convert(_ rect: CGRect, to view: UIView?) -> CGRectParameters
- rect:
A rectangle specified in the local coordinate system (bounds) of the receiver.
- view:
The view that is the target of the conversion operation. If
viewisnil, this method instead converts to window base coordinates. Otherwise, bothviewand the receiver must belong to the same Uiwindow object.
Return Value
The converted rectangle.