Instance Method

equalTo(_:)

Returns whether two rectangles are equal in size and position.

Declaration

func equalTo(_ rect2: CGRect) -> Bool

Parameters

rect2

The rectangle to compare this rectangle with.

Return Value

true if the two specified rectangles have equal size and origin values, or if both rectangles are null rectangles. Otherwise, false.