I realize you have solved your problem, just pointing out you could simplify a bit by leaving out the unsigned integer bit.
NSDateComponents *components = [gregorianCalendar components:NSDayCalendarUnit
fromDate:startDate
toDate:endDate
options:0];
This should be a comment not an answer, but I can't comment even though I should be able to.