开发者

appending array in objective c

开发者 https://www.devze.com 2023-02-27 10:03 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消