How do I put a button touchupinside in my override of PrepareforSegue? I am using storyboards. I created a segue from one screen to the next in the storyboard. Using touchupinside, when a user clicks the button in the first screen, I save data via a webservice call then do a performsegue programmatically. I use my override of PrepareForSegue to pass data to the next screen. What happens is the PrepareforSegue is called and the segue happens, then my touchupinside is called and the data is saved. The app segues twice instead of once. I want the touchupinside to happen before the segue. I am already overriding ShouldPerformSegue to check if the text fields are blank. What is the correct way to do this?