Instance Method

convertRect:toView:

Converts a rectangle from the receiver’s coordinate system to that of another view.

Declaration

- (CGRect)convertRect:(CGRect)rect toView:(UIView *)view;

Parameters

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 view is nil, this method instead converts to window base coordinates. Otherwise, both view and the receiver must belong to the same UIWindow object.

Return Value

The converted rectangle.

See Also

Converting Between View Coordinate Systems

- convertPoint:toView:

Converts a point from the receiver’s coordinate system to that of the specified view.

- convertPoint:fromView:

Converts a point from the coordinate system of a given view to that of the receiver.

- convertRect:fromView:

Converts a rectangle from the coordinate system of another view to that of the receiver.