I am trying to call a function after a delay. On iOS10 I am able to use Timer.scheduledTimer which does indeed call my closure after the given delay. However, on iOS9 I am u
asyncAfter
is only guaranteed to wait at least as long as specified.
You probably should still be using Timer if you want exact time intervals on iOS9.
Timer.scheduledTimer(timeInterval: delay,
target: self,
selector: #selector(executeClosure),
userInfo: nil,
repeats: false)
With executeClosure being a function that executes the last saved closure.