Here’s how to get the start of a day in Objective-C:

- (NSDate*)startOf:(NSDate*)date {
    int comps = NSYearCalendarUnit | 
        NSMonthCalendarUnit | NSDayCalendarUnit;
    NSDateComponents* dc = [[NSCalendar currentCalendar]
        components:comps fromDate:date];
    return [[NSCalendar currentCalendar] dateFromComponents:dc];
}

Thanks for reading! And if you want to get in touch, I'd love to hear from you: chris.hulbert at gmail.