Instance Method

intersection(_:)

Returns the rectangle representing the intersection of two rectangles.

Declaration

func intersection(_ rect2: MKMapRect) -> MKMapRect

Parameters

rect1

The first rectangle.

rect2

The second rectangle.

Return Value

The rectangle representing the intersection of the two rectangles or null if there is no intersection.

See Also

Modifying the Rectangle

func union(MKMapRect) -> MKMapRect

Returns a rectangle representing the union of the two rectangles.

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

Returns the specified rectangle inset by the specified amounts.

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

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