[Solved] Objective C NSArray [closed]

[ad_1]

Your array is an array literal which means it is immutable. In order to make an array that you can change, do this:

NSArray *oneInfo = @[@{@"trackTime":theTrack[@"seconds"],@"trackPrice":theTrack[@"price"],@"trackWait":theTrack[@"wait"]}];
NSMutableArray* somethingICanChange = [oneInfo mutableCopy];
[somethingICanChange addObject: moreData];

Note that, if you are not using ARC (why not?), somethingICanChange is an array that you own and needs to be released or autoreleased when you are done with it.

[ad_2]

solved Objective C NSArray [closed]