views:

53

answers:

1

I have the following code

NSMutableArray *plistArray = [[NSMutableArray alloc] initWithContentsOfFile:filepath];
[plistArray insertObject:title atIndex:2];

but would like to rather add the object to the end of the array.

How can this be done, and do I need to set the last value to nil, at the moment I dont and it works fine.

Regards

+5  A: 
[plistArray addObject:title];

See the NSMutableArray Class Reference.

KennyTM
+1 for the link to the reference documentation which for some reason is not checked before posting a question on SO
falconcreek