In my GameViewController i have this function:
func shareButton(){
var myShare = "test"
let activityVC:UIActivityViewController = UIActivityViewController(activityItems: [myShare], applicationActivities: nil)
self.presentViewController(activityVC, animated: true, completion:nil)
}
I Want to call this function from my GameScene, I tried it like this but it won't work:
GameViewController.shareButton()
This gives the error: "Missing argument for parameter #1 in call"
What is the proper way to make this work?