how I can get the NSDate of yesterday in iOS?
Thanks
Here is one way to do that:
NSDateComponents *components = [[[NSDateComponents alloc] init] autorelease];
[components setDay:-1];
NSDate *yesterday = [[NSCalendar currentCalendar] dateByAddingComponents:components toDate:[NSDate date] options:0];
Take a look at the Date and Time programming guide.