In this scenario, timerFunc() is never called. What am I missing?
class AppDelegate: NSObject, NSApplicationDelegate {
var myTimer: NSTimer? = nil
i use a similar approach to Luke. Only a caveat for people who are "private methods" purists:
DO NOT make callback private in Swift.
If You write:
private func timerCallBack(timer: NSTimer){
..
you will get:
timerCallBack:]: unrecognized selector sent to instance... Terminating app due to uncaught exception 'NSInvalidArgumentException'