I am attempting pass a function to another function and then have the passed function executed passing to it a variable.
Here is my code:
func showSt
I use this way :
ViewController1
destination.callback = { (id) -> Void in print("callback") print(id) }
ViewController2
var callback: ((_ id: Int) -> Void)? callback?(example_id)