title: How do I call a method from another class in Swift?
body: <p>When a button is pressed in FirstViewController, I would like for it to call a func pressedButton() in another class (SecondViewController). How do I do this?</p>
  
  <p>I've tried the following, and it does not work right:</p>
  
  <pre><code>SecondViewController().pressedButton()
  </code></pre>
  
  <p>Here's the code for pressedButton:</p>
  
  <pre><code>func pressLearnButton() {
          let screenSize: CGRect = UIScreen.mainScreen().bounds
          let screenWidth = screenSize.width
          self.scrollView.setContentOffset(CGPoint(x: screenWidth, y: 0), animated: true)
      }
  </code></pre>