Objective-C LanguageNSArray

Syntax

  • NSArray *words; // Declaring immutable array
  • NSMutableArray *words; // Declaring mutable array
  • NSArray *words = [NSArray arrayWithObjects: @"one", @"two", nil]; // Array initialization syntax
  • NSArray *words = @[@"list", @"of", @"words", @123, @3.14]; // Declaring array literals
  • NSArray *stringArray = [NSArray arrayWithObjects: [NSMutableArray array], [NSMutableArray array], [NSMutableArray array], nil]; // Creating multidimentional arrays

Related Examples

Creating Arrays