Can you try below lines of code?
switch ([dateOne compare:dateTwo]){
case NSOrderedAscending:
NSLog(@"NSOrderedAscending");
break;
case NSOrderedSame:
NSLog(@"NSOrderedSame");
break;
case NSOrderedDescending:
NSLog(@"NSOrderedDescending");
break;
}
But in your case I think you need to keep both dates in same format ..or some thing like this
NSDateComponents *components = [[NSCalendar currentCalendar] components:NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit fromDate:[NSDate date]];
[components setHour:23];//change your time to 24hrs formate
[components setMinute:05];
[components setSecond:00];
NSDate *dateOne = [[NSCalendar currentCalendar] dateFromComponents:components];
components = [[NSCalendar currentCalendar] components:NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit fromDate:[NSDate date]];
NSDate *dateTwo = [[NSCalendar currentCalendar] dateFromComponents:components];
and do comparison between dateOne and dateTwo.