Instance Method

contains(_:)

Returns Boolean value indicating whether one rectangle contains another.

Declaration

func contains(_ rect2: MKMapRect) -> Bool

Parameters

rect1

The containing rectangle.

rect2

The rectangle that might be contained in rect1.

Return Value

true if rect2 is null or lies entirely inside rect1; otherwise, returns false if rect1 is null or does not completely enclose rect2.

See Also

Intersecting the Rectangle

func contains(MKMapPoint) -> Bool

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

func intersects(MKMapRect) -> Bool

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