I am trying to make a ios app using xcode. I don't want to use the UIBarButton because I don't want the users to be able to go back. I tried following this previous post: Using UIButton to navigate between views But it was not working for me.I have this for code:
`//MARK: Navigation
@IBAction func adClosure(_ sender: UIButton) {
self.prepareForSegue(segue: "adToMain", sender: self)
}
func prepareForSegue(segue: UIStoryboardSegue!, sender: AnyObject!) {
if segue.identifier == "adToMain" {
}
}
The transition segue is called adToMain in my Main.storyboard. I have an error on the line with self.prepareForSegue(segue: "adToMain", sender: self)
because of mismatching argument types.
Thank you for the help in advance.