32

[array objectAtIndex:i] doesn't work as an L value, so it can't be used to set the object at index i.

node ninja
  • 31,796
  • 59
  • 166
  • 254

1 Answers1

88

Use -insertObject:atIndex: or replaceObjectAtIndex:withObject:.

Dave DeLong
  • 242,470
  • 58
  • 448
  • 498
Costique
  • 23,712
  • 4
  • 76
  • 79