Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

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

$
0
0

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?


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>