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
You can actually call:
NSTimer.scheduledTimerWithTimeInterval(ti: NSTimeInterval,
target: AnyObject,
selector: #Selector,
userInfo: AnyObject?,
repeats: Bool)
Use it like this:
NSTimer.scheduledTimerWithTimeInterval(1,
target: NSBlockOperation(block: {...}),
selector: #selector(NSOperation.main),
userInfo: nil,
repeats: true)