Not sure if this is common knowledge, but searching the Internet on this subject turns up solutions using NSDateComponents which is fine. Here is a very quick and easy way I have found to do it with NSDateFormatter.
John
Code:
dateAtMidnightFormatter = [[NSDateFormatter alloc] init];
[dateAtMidnightFormatter setDateStyle:NSDateFormatterShortStyle];
[dateAtMidnightFormatter setTimeStyle:NSDateFormatterNoStyle];
NSDate *todayAtMidnight = [dateAtMidnightFormatt dateFromString:[dateAtMidnightFormatter stringFromDate:[NSDate date] ] ];
John