I want to be able to schedule three small events in the future without having to write a function for each. How can I do this using NSTimer? I understand block
I love this hack @Peter-Pang!! BlockOperation is created on the fly, own by the Timer which itself is own by the running queue, and call the main selector on the block to run it.... nice!!!
Updated for Swift 3
Timer.scheduledTimer(timeInterval: 1, target: BlockOperation {
// ...
}, selector: #selector(Operation.main), userInfo: nil, repeats: false)