title: Calling Function from another class swift
body: <p>Im having trouble calling a function in my GameViewController.swift from another class, Menu.swift.
  I call the function like this:</p>
  
  <pre><code>class Menu: SKnode {
  
      func scoreAction(sender:UIButton!) { 
          self.buttonPlay.removeFromSuperview()
          self.buttonScore.removeFromSuperview()
           // CALLING FUNCTION
          GameViewController.showLeaderboard()    
       }
  }
  </code></pre>
  
  <p>And here is the function I'm trying to call:</p>
  
  <pre><code>class GameViewController: UIViewController,
   UITextFieldDelegate, GKGameCenterControllerDelegate  {
  
     func showLeaderboard()
      {
        var gcViewController: GKGameCenterViewController = GKGameCenterViewController()
        gcViewController.gameCenterDelegate = self
  
        gcViewController.viewState = GKGameCenterViewControllerState.Leaderboards
        gcViewController.leaderboardIdentifier = "yourleaderboardid"
  
        self.presentViewController(gcViewController, animated: true, completion: nil)
      }
  </code></pre>
  
  <p>}</p>
  
  <p>I have a Compiler Error inside my Menu class in the line GameViewController.showLeaderboard() 
  "Missing argument for parameter #1 in call" But I don't understand what type of argument the compiler is expecting because I declared the function without any needing any parameters.</p>
  
  <p>Thank you</p>