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