Perhaps NSNotFound can be used in contexts that use NSInteger . It is also safer if someone declares the index as NSInteger instead of NSUInteger .
In the best case, we can say that it is odd, that NSNotFound is defined as NSIntegerMax , but this, of course, is not an error.
source share