title: UIScrollView Not Working When Page Is Reloaded
body: <p>I'm having an issue with a UIScrollView implementation. The first time the view is loaded, the scrollView works fine. However, when I move to another view with a navigation drawer and then come back to the original view, the scrollView no longer scrolls but still contains content.</p>
  
  <p>The UIScrollView which contains UITextFields and UIButtons pragmatically created at run time. The views are created within the <code>viewDidLoad()</code> function and then added to a parent view which is then added to the scrollView. Because the size of the scroll content varies at run time, this is set programmatically in the <code>viewDidLayoutSubviews()</code> function: </p>
  
  <pre><code> override func viewDidLayoutSubviews() {
      super.viewDidLayoutSubviews()
  
      self.scrollView.contentSize = CGSizeMake(self.accountCardView.frame.width, self.cardHeight.constant + 15)
  }
  </code></pre>
  
  <p>In this code sample, the cardHeight variable is a constraint containing the height of the main view in the scrollview. This is the view which contains the textFields and buttons. </p>
  
  <p>I have placed a debug point within the viewDidLayoutSubviews() function to observe the cardHeight variable. The cardHeight is consistent every time the page is loaded and should set the scrollView content size properly.</p>
  
  <p>I have also tried redrawing the views within the <code>viewWillAppear()</code> function but observed the same results.</p>
  
  <p>Does anyone have ideas as to why the scroll view does not work when the page is reloaded?</p>