Creating Arrays

suggest change

Creating immutable arrays:

NSArray *myColors = [NSArray arrayWithObjects: @"Red", @"Green", @"Blue", @"Yellow", nil];

// Using the array literal syntax:
NSArray *myColors = @[@"Red", @"Green", @"Blue", @"Yellow"];

For mutable arrays, see NSMutableArray.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


NSArray:
*Creating Arrays

Table Of Contents