I have viewController1
and viewController2
which is modaly presented and I want to use the completion handler when I dismiss the 2nd, but I can't get the implementation. I thought that I have to write a function and just put it there like:
viewController.dismissViewControllerAnimated(true, completion: funcToCall())
but then I get this error:
Cannot convert value of type '()' to expected argument type '(() -> Void)?'
Anyone can explain me, how can I execute properly the completion handler, please?