title: IBOutlet button not working - Swift
body: <p>I have searched for a similar question to this but cannot find it because mine is very obscure.</p>
  
  <p>I am currently developing a social network app. All my code seems to be correct. However, there is the share button that is not working. I will attach the code here:</p>
  
  <pre><code>@IBOutlet weak var shareBtn: UIButton!
  </code></pre>
  
  <p>which is in one of my files to connect it up and:</p>
  
  <pre><code>@objc func toCreatePost (_ sender: AnyObject) {
      performSegue(withIdentifier: "toCreatePost", sender: nil)
  }
  </code></pre>
  
  <p>Before you ask, all of my segues are connected, the buttons are connected to the code and the identifier is correct.</p>
  
  <p>I don't know if it could be an error in Xcode itself or my code, but the button clicks when it is run however it does not do anything. Help would be appreciated.
  The error is that when the button is clicked it does not do anything and will not go to the next ViewController even though the code seems to be correct.</p>
  
  <pre><code>@IBAction func toCreatePost (_ sender: AnyObject) {
      performSegue(withIdentifier: "toCreatePost", sender: nil)
  }
  </code></pre>
  
  <p>Above is the code with an IBaction which I edited which now gives me a crash. The crash is a Thread 1: signal SIGABRT</p>
  
  <p>Here is my main.storyboard</p>
  
  <p><img src="https://i.stack.imgur.com/dUpAt.png" alt="main.storyboard image."></p>