-1

I'm trying to determine if the user set a date picker to a day less than today. E.g, today is 4/23/17, so I want to detect if the user does like 4/15/17 or like 2/4/17. Basically anything less than the date. I'm kind of stuck. If you know how to do it, please help.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Visastar
  • 1
  • 4

1 Answers1

0
NSDate *date1 = [NSDate date];
NSDate *date2 = [NSDate date];

if([date1 compare:date2] == NSOrderedAscending)
{

}
nspavlo
  • 377
  • 3
  • 12
  • Code only answers are low quality and candidates for deletion, there should always be at least 1 or 2 sentences explaining what part of the question you are answering. – Eric Leschinski Apr 24 '17 at 03:42