Instance Method

offsetBy(dx:dy:)

Returns a rectangle whose origin point is shifted by the specified amount.

Declaration

func offsetBy(dx: Double, dy: Double) -> MKMapRect

Parameters

rect

The original rectangle.

dx

The amount (in map points) by which to shift the x-coordinate of the origin point.

dy

The amount (in map points) by which to shift the y-coordinate of the origin point.

Return Value

The offset rectangle. If the original rectangle was null, that rectangle is returned instead.

See Also

Modifying the Rectangle

func union(MKMapRect) -> MKMapRect

Returns a rectangle representing the union of the two rectangles.

func intersection(MKMapRect) -> MKMapRect

Returns the rectangle representing the intersection of two rectangles.

func insetBy(dx: Double, dy: Double) -> MKMapRect

Returns the specified rectangle inset by the specified amounts.