开发者

how to continuously display time in cocoa?

开发者 https://www.devze.com 2022-12-16 05:39 出处:网络
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 s

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

精彩评论

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