[Solved] How to get NSDateComponents between two NSDateComponents?

[ad_1]

You always add the same element to the array. The array just hold pointers to its
elements, therefore at the end of the loop, it contains n pointers to the same
object first. Changing

[array addObject:first];

to

[array addObject:[first copy]];

should solve the problem.

0

[ad_2]

solved How to get NSDateComponents between two NSDateComponents?