Implementation of `NSComparisonMethods` for iOS.