Is there any way to return an @objc
function in swift?
Currently I have this
private func getFunction(for index: IndexPath) -> () -> () {
return {
print("pressed")
}
}
I am trying to use that as a selector like so
UITapGestureRecognizer(target: self, action: #selector(self.getFunction(for: index)))
But #selector
only works with ObjC function, so I would need to do something like this
return @objc {
print("pressed")
}