简体   繁体   中英

copy NSMutableArray atIndex (0) to other NSMutable index (0)

i have 2 array 1st array if full
2nd array is empty
i want to copy only 1st array value at index 0 to 2nd array at index 0

is it possible?

thank u in advance

[array2 insertObject: [array1 objectAtIndex: 0u] atIndex: 0u]

secondArrayValue = [[NSMutableArray alloc]initWithArray:ArrayValue copyItems:YES];

这对我有用。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM