Open Instance Methodswift 6.0.3Foundation

isEqual(_:)

Returns a Boolean value that indicates whether the instance is equal to another given object.

func isEqual(_ object: Any?) -> Bool

Parameters

object

The object with which to compare the instance.

Returns

true if the instance is equal to object, otherwise false.

The default implementation for this method provided by NSObject returns true if the objects being compared refer to the same instance.