Simplest way to loop between two NSDates on iPhone?
问题 What's the simplest way to loop from one date to another? What I want conceptually is something like this: for (NSDate *date = [[startDate copy] autorelease]; [date compare: endDate] < 0; date = [date dateByAddingDays: 1]) { // do stuff here } This doesn't work, of course: there's no dateByAddingDays: . And even if it did, it would leave a wide trail of autoreleased objects waiting for their destruction. Here's what I've thought of: I can't just add an NSTimeInterval , since the number of