Så här blev det:
NSDateFormatter *formattedTime = [[NSDateFormatter alloc] init];
[formattedTime setDateFormat:@"HH:mm"];
NSDate *now = [[NSDate alloc] init];
NSString *currentTime = [formattedTime stringFromDate:now];
NSString *scheduledTime = @"12:00";
[formattedTime release];
[now release];
NSComparisonResult result = [currentTime compare:scheduledTime];
switch (result)
{
case NSOrderedAscending: NSLog(@"%@ is before %@", currentTime, scheduledTime); break;
case NSOrderedDescending: NSLog(@"%@ is after %@", currentTime, scheduledTime); break;
case NSOrderedSame: NSLog(@"%@ is same %@", currentTime, scheduledTime); break;
default: NSLog(@"erorr dates %@, %@", currentTime, scheduledTime); break;
}
Tack ciryon för att du pekade mig i rätt riktning.