看板
[ MacDev ]
討論串[問題] 請問Cocoa程式要如何一直做同件事情?
共 7 篇文章
內容預覽:
再補充一下NSRunLoop的使用時機:. 1. Use ports or custom input sources to communicate with other threads.. 2. Use timers on the thread.. 3. Use any of the perform
(還有173個字)
內容預覽:
把你的code刪掉了. 同樣的事,我會用下面的做法:. //Do it by Timer. @interface MyObject: NSObject. {. NSTimer* myTimer;. }. - (IBAction)startTimer:(id)sender;. - (IBAction)
(還有4014個字)
內容預覽:
當AP被執行後,AP會自動執行一個NSRunLoop. 這個RunLoop是不可以被停止的.... 依照你的Code來看,你只是增加了一個Timer,然後把它加入了RunLoop中.... RunLoop依照你的Timer設定值及Mode,決定何時呼叫你註冊的Function。. 要停掉Timer,
(還有141個字)
內容預覽:
不好意思小弟不才. 研究了一下了解了一些NSRunLoop. 可是還是有問題. 我想要按一個扭開始一直做某件事情. 按另一個則停止. 但我還是不知道要怎麼讓它停止NSRunLoop. 實在想不出辦法來. 想要請教高手指點....感激不盡(躬). 我的code:. #import "Converter
(還有981個字)