iphone Programming Glossary: currseconds
Implementing a Countdown Timer in Objective-c? http://stackoverflow.com/questions/10663184/implementing-a-countdown-timer-in-objective-c You can do it like this ARC Enabled @interface ViewController UILabel progress NSTimer timer int currMinute int currSeconds @end @implementation ViewController void viewDidLoad super viewDidLoad progress UILabel alloc initWithFrame CGRectMake 80.. progress setText @ Time 3 00 progress.backgroundColor UIColor clearColor self.view addSubview progress currMinute 3 currSeconds 00 Do any additional setup after loading the view typically from a nib. void start timer NSTimer scheduledTimerWithTimeInterval.. 1 target self selector @selector timerFired userInfo nil repeats YES void timerFired if currMinute 0 currSeconds 0 currMinute 0 if currSeconds 0 currMinute 1 currSeconds 59 else if currSeconds 0 currSeconds 1 if currMinute 1 progress..
|