How to avoid two segues/check a button click in PrepareForSegue?

JakeGoveJakeGove USMember

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?

Best Answers

Answers

  • JakeGoveJakeGove USMember

    BytesGuy, then how do I pass data to the next screen if I can't use PrepareForSegue?

Sign In or Register to comment.