title: How to perform different segue based on condition from a button click in swift?
body: <p>I'm building an app in which a button takes you to a profile registry view if you open the app for the first time and into another if you open the app any other time. How can I accomplish this programmatically, everything i have seen only connects the button to one view.</p>
  
  <pre><code>@IBAction func NextViewController(_ sender: UIButton) {
      if launchedBefore  {
          print("Not first launch.")
  
      } else {
          print("First launch, setting UserDefault.")
  
  
          UserDefaults.standard.set(true, forKey: "launchedBefore")
      }
  }
  </code></pre>