使用 FilterPredicate 解决的问题:
NSDate *afterDate=[balanceDateAfter objectValue];
NSDate *beforeDate=[balanceDateBefore objectValue];
NSComparisonResult duration=[beforeDate timeIntervalSinceDate:afterDate];
duration=duration/3600;
duration=duration/24;
NSLog(@"After Date is : %@",afterDate);
NSLog(@"Before Date is : %@",beforeDate);
[checkInBalanceArray setFilterPredicate:[NSPredicate predicateWithFormat:@"(checkDate >= %@) AND (checkDate <= %@)", afterDate, beforeDate]];
[checkOutBalanceArray setFilterPredicate:[NSPredicate predicateWithFormat:@"(checkDate >= %@) AND (checkDate <= %@)", afterDate, beforeDate]];