title: 1 UIButton two separate Segues
body: <p>I have a UIButton which is controlled by a SegmentedController now my question is: How does one present a popover segue dependant on the outcome of the single button. Basically, I have one Button which is set for either Login or Sign Up. If the user Logs in, then that goes to the Home screen which works fine etc, but when I select the Sign Up option, the button changes to Sign Up and when I click that I would like a popover to be modally presented over the current screen for the user to sign up. my current code allows me to login but when the button is switched to the Sign Up option, I cannot for the life of me work this out and its been twisting my brain for the past 6 hours now. I have read so much about segues and I cannot figure it out.... Your help will be GREATLY APPRECIATED.</p>
  
  <p><a href="https://i.stack.imgur.com/iHsHg.png" rel="nofollow noreferrer">Picture of my code if it helps</a></p>