I have this very simple code to trigger a timer:
var timer = NSTimer.scheduledTimerWithTimeInterval(NSTimeInterval(2), target: self, selector: "timerDidFire:", userInfo: nil, repeats: true)
However it's giving me:
Cannot invoke 'scheduledTimerWithTimeInterval' with an argument list of type '(Double, target: TestVC -> () -> TestVC, selector: String, userInfo: nil, repeats: Bool)'
Which doesn't make any sense, my arguments types match exactly the required ones.
Here's the function definition:
scheduledTimerWithTimeInterval(ti: NSTimeInterval, target aTarget: AnyObject, selector aSelector: Selector, userInfo: AnyObject?, repeats yesOrNo: Bool) -> NSTimer
What am I doing wrong?