objective c - iPhone register for clock updates -


One view in my application is a clock that I want to sync with the system. Many stack questions are centered around NSTimer, but before doing so, I want to check whether there is a system notification which I can register which is removed every minute

Is there such a thing is? I'm looking through the NSNotificationCenter, but nothing has so far.

You calculate the next change of NSTimer Code> S initWithFireDate minutes to ignite: NSDate * currentDate = [NSDate date]; NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init]; [DateFormatter setDateFormat: @ "ss"]; Int on current timecents = [datefirm string string: currentdata] .intvalue; NSDT * FireData = [NSDT date with timewall: now: 60 - current time limit]; NSTimer * updateTimer = [[NSTimer alloc] initWithFireDate: FireDate Interval: 60 Goal: Self Selector: @selector (Update Selector) User Information: Zero Repeats: Yes]; NSRunLoop * runLoop = [NSRunLoop currentRunLoop]; [Run loop adjustment: update timer format: NSDifference array loop mode];

Comments