Changes

Working with Objective-C Array Objects

60 bytes added, 19:04, 24 November 2009
no edit summary
<hr>
<google>BUY_OBJC</google>
An array is an object that contains collections of other objects. Array objects in Objective-C are handled using the Foundation Framework NSArray class. The NSArray class contains a number of methods specifically designed to ease the creation and manipulation of arrays within Objective-C programs. Unlike some object oriented programming languages (C# being one example), the objects contained in an array do not all have to be of the same type.
As we can see from the above example, the method returns a new array containing the elements of the original array sorted using the ''localizedCaseInsensitiveCompare'' method. In practice any method can be used in this context as long as that method is able to compare two objects and return an ''NSOrderedAscending'', ''NSOrderedSame'' or ''NSOrderedDescending'' result.
 
<google>BUY_OBJC_BOTTOM</google>
<hr>