User Tools

Site Tools


Programming Reference/Librarys

Question & Answer

Q&A is closed


This is an old revision of the document!


The addObject: method is used when dealing with NSMutableArray. It is used to add items onto the stack of the array. A simpler example of this is to imagine a stack of paper. When calling the addObject method, it is essentially the same as a person adding a piece of paper onto the stack of paper.

Source Code Example

NSMutableArray *mArray = [[NSMutableArray alloc] init];
//** Adding object **
[mArray addObject:@"Hello"];
//** Displaying the contents of the array into the console **
for(id obj in mArray) {
   NSLog("%@", mArray);

objective-c/foundation.framework/nsmutablearray.h/addobject.1401479681.txt · Last modified: 2014/05/30 21:54 by Mo

Impressum Datenschutz