开发者

how to continuously display time in cocoa?

I have some code to control some buttons for an interface, but I would like to add a small text label that continuously displays time by hh:mm:ss. How do I do 开发者_如何转开发that?


well, i think you should take a look at some cocoa development related books or websites - like cocoadev cocoadevcentral cocoabuilder ...

in short: define your

IBOutlet NSTextField* timeLabel;

in your controller class and hook it up to the NSTextField in your NIB. take a look at NSDate and update it (via a NSTimer or your draw loop)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜