I am programming with Swift 2.1.
I have a function in class:
private func doTask(button: UIButton) {...}
I want to call this function after 2 seconds, I know I could use :
NSTimer.scheduledTimerWithTimeInterval(2, target: self, selector: "doTask", userInfo: nil, repeats: false)
But, in the selector
part, how can I pass the parameter button: UIButton
to doTask
?