Operator

==(_:_:)

Returns a Boolean value indicating whether two values are equal. NSObject implements this by calling lhs.isEqual(rhs).

Declaration

static func == (lhs: NSObject, rhs: NSObject) -> Bool

Parameters

lhs

A value to compare.

rhs

Another value to compare.

Discussion

Subclasses of NSObject can customize Equatable conformance by overriding isEqual(_:). If two objects are equal, they must have the same hash value, so if you override isEqual(_:), make sure you also override the hash property.

Relationships

From Protocol