Instance Method

inset(by:)

Adjusts a rectangle by the given edge insets.

Declaration

func inset(by insets: UIEdgeInsets) -> CGRect

Parameters

rect

The rectangle to be adjusted.

insets

The edge insets to be applied to the adjustment.

Return Value

A rectangle that is adjusted by the UIEdgeInsets structure passed in insets.

Discussion

This inline function increments the origin of rect and decrements the size of rect by applying the appropriate member values of the UIEdgeInsets structure.

See Also