User Tools

Site Tools


Programming Reference/Librarys

Question & Answer

Q&A is closed



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 content of the array in console **
for(id obj in mArray) {
   NSLog("%@", mArray);

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

Impressum Datenschutz