I'm confused about this code:
for (int i = 0; i < [content count]; i++) {
NSString *dateString = [self replaceCharacters:[[[content objectAtIndex:i] objectForKey:@"date"] objectForKey:@"text"]];
NSLog(@"\n\n%i",[[dateFormatter stringFromDate:[originalDate dateFromString:[[[content objectAtIndex:i] objectForKey:@"date"] objectForKey:@"text"]]] intValue]);
if ([[dateFormatter stringFromDate:[originalDate dateFromString:dateString]] intValue] >= [todayString intValue]) {
[tempContent addObject:[content objectAtIndex:i]];
}
}
I'll explain:
I need to check if the date of every object in contents is higher or equal to the today date. If it's so, it will be added to the tempContent. But the tempContent count is equal to the content count. Nothing got sorted...
Does anyone see the solution?!
Thanks, mavrick3.