I am implementing the scheduleTimer
function of a Timer
in a mock Timer to be able to unit test my code. It looks like this:
static func scheduledTimer(
timeInterval ti: TimeInterval,
target aTarget: Any,
selector aSelector: Selector,
userInfo: Any?,
repeats yesOrNo: Bool) -> Timer
I need to be able to call aSelector
like a closure, but I'm not sure how that's possible with it being a Selector
. How can I do this?