I have searched for a similar question to this but cannot find it because mine is very obscure.
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:
@IBOutlet weak var shareBtn: UIButton!
which is in one of my files to connect it up and:
@objc func toCreatePost (_ sender: AnyObject) {
performSegue(withIdentifier: "toCreatePost", sender: nil)
}
Before you ask, all of my segues are connected, the buttons are connected to the code and the identifier is correct.
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.
@IBAction func toCreatePost (_ sender: AnyObject) {
performSegue(withIdentifier: "toCreatePost", sender: nil)
}
Above is the code with an IBaction which I edited which now gives me a crash. The crash is a Thread 1: signal SIGABRT
Here is my main.storyboard