Operator

==(_:_:)

Returns a Boolean value indicating whether two values are equal.

Declaration

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

Parameters

lhs

A value to compare.

rhs

Another value to compare.

Return Value

true if the two items are equal, or false if they are not equal.

Discussion

Objects implement this method by calling isEqual(_:) on the lhs parameter. 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

See Also

Comparing View Controllers

static func != (NSHostingController<Content>, NSHostingController<Content>) -> Bool

Returns a Boolean value indicating whether the two objects are not equivalent.