i read this command from cocoadev.com but was not able to get i开发者_运维技巧t plz help me in explaining what this line of code do
[array addObject:[NSNumber numberWithInt:15]];
You have to use NSMutableArray
instead of NSArray
to use the method addObject:
.
It adds a number object with the integer value of 15 to the collection (presumably an NSMutableArray) called array
.
精彩评论