How can I combine multiple NSArrays into one array with alternating values? For example.
Array One: Orange, Apple, Pear
Array Two: Tree, Shrub, Flower
Array Three: Blue, Green, Yellow
The final array would need to be:
Orange, Tree, Blue, Apple, Shrub, Green, etc
Assuming the arrays are all of the same length:
You will probably want to test that the arrays are of the same length. You cannot add
nilto anNSMutableArrayorNSArray. You can add anNSNullplaceholder, but it’s probably better to check your input.