Instance Method

contains(_:)

Returns a Boolean value indicating whether the specified map point lies within the rectangle.

Declaration

func contains(_ point: MKMapPoint) -> Bool

Parameters

rect

The map rectangle being tested.

point

The point to check.

Return Value

true if the rectangle is not null or empty and the point is located inside the rectangle; otherwise, false.

Discussion

A point is considered to be inside the rectangle if its coordinates lie inside the rectangle or on the minimum X or minimum Y edge.

See Also

Intersecting the Rectangle

func contains(MKMapRect) -> Bool

Returns Boolean value indicating whether one rectangle contains another.

func intersects(MKMapRect) -> Bool

Returns a Boolean value indicating whether two rectangles intersect each other.