In Objective-C (and other languages) a relatively good default implementation of - (NSUInteger)hash might be:
- (NSUInteger)hash
- (NSUInteger)hash { return 31u
As suggested by Fabian Kreiser one can use the overflow operators to make the hashValue method as follows:
var hashValue: Int { return (31 &* property1.hashValue) &+ property2.hashValue }
The value still overflows, but at least it doesn't crash