Copyright: (C) 2003-2010 Free Software Foundation, Inc.
- Declared in:
Method for working with sorted arrays - use a binary chop to determine the insertion location for an object. If equal objects already exist in the array, they will be located immediately before the insertion position.
The comparator function takes two items as arguments, the first is the item to be added, the second is the item already in the array. The function should return NSOrderedAscending if the item to be added is 'less than' the item in the array, NSOrderedDescending if it is greater, and NSOrderedSame if it is equal.