EDIT: I thought the issue was Swift syntax, but the problem was that I did not know that the UIViewController.presentViewController specifies a signature for the completion handler that takes no input parameters.
I have to provide a completion handler to presentViewController. The completion handler I want to provide takes an input parameter. What is the syntax to handle this in swift?
If the handler did not take an input parameter it would look like this:
self.presentViewController(activityVC, animated: true, completion: myHandler)
But how would the above line look if myHandler was declared like this:
func myHandler(myParameter: AnyObject){
...
}
(() -> Void)as its completion handler if that is what you want. If you want it to return a value you would use something like(() -> Int)