A
A
aulandsdalen2014-01-30 10:47:57
Objective-C
aulandsdalen, 2014-01-30 10:47:57

How to determine the system time in OS X?

Hey! I'm writing an application (in Objective-C) and I want it to show the system time. That is, one that will coincide with the time from the clock on the top-right and be updated simultaneously with it. Is there any way to do this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
An, 2014-01-31
@aulandsdalen

In general, there are a bunch of videos on YouTube where they tell and show how to quickly make a watch. Google the objective-c clock tutorial or something like that.
Getting the current time - [NSDate date]
Update - "schedule" NSTimer at intervals of 1 (or whatever you need) second, get [NSDate date] and redraw the UI

A
Alexey Storozhev, 2014-01-30
@storoj

[NSDatedate] ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question