title: Programmatically transitioning between two UIViewControllers (Xcode 9, Swift 4)
body: <p>The app I am currently working on requires that I do not use ANY storyboards. Therefore I need to do everything programmatically. One thing I seem to be struggling with is switching between two UIViewControllers.</p>
  
  <p>The issue is that every time I call the <code>self.present()</code> method; it creates a brand new instance of the class I would like to show. So when I go into Xcode's visual debugger, I see over 15 different views that are all stacked and are merely instantiations of one another. Ex: View1, View2, View1, View2, View1, View2, View1... This constant repetition of the views is significantly hurting the performance of my app. So my question:  </p>
  
  <p><strong>Is there a way that I can switch between my two UIViewControllers without constantly creating a new instance of each one?</strong> </p>
  
  <p><em>Again, I am doing all of this with ALL storyboards DELETED. So the solution I necessary needs to be implemented using ONLY code.</em></p>