I am trying to work through some of the AppsAmuck tutorials but they mostly seem to use code that Apple has deprecated. For example, there is a function that is called by a timer every second that looks like this:
NSDate *now = [NSDate date];
int hour = 23 - [[now dateWithCalendarFormat:nil timeZone:nil] hourOfDay];
int min = 59 - [[now dateWithCalendarFormat:nil timeZone:nil] minuteOfHour];
int sec = 59 - [[now dateWithCalendarFormat:nil timeZone:nil] secondOfMinute];
countdownLabel.text = [NSString stringWithFormat:@"%02d:%02d:%02d", hour, min,sec];
Unfortunately, none of this works with today's current SDK. I have been staring glossy-eyed at Apple's NSDate documentation and I am having trouble translating the intent of the function above into current day NSDate lingo.