title: SIGABRT when adding a constraint to a uiview
body: <p>Once again auto layout has me scratching my head. I define a UIView and UITextField at the top of my class:</p>
  
  <pre><code>var urlField = UITextField(frame: .zero)
  var barView = UIView(frame: .zero)
  </code></pre>
  
  <p>I call my configuration method from viewWillAppear (so I know that self.view is all set):</p>
  
  <pre><code>   override func viewWillAppear(_ animated: Bool) {
                  configureURLBar()
      }
  </code></pre>
  
  <p>And I'm doing nothing special there. </p>
  
  <pre><code>func configureURLBar() {
      barView.translatesAutoresizingMaskIntoConstraints = false
      barView.topAnchor.constraint(equalTo: self.view.layoutMarginsGuide.topAnchor).isActive = true
      barView.heightAnchor.constraint(equalToConstant: 30).isActive = true
      }
  </code></pre>
  
  <p>When it gets to the topAnchor constraint I get the exception, and I don't understand why.  If I reverse the 2nd and 3rd lines it doesn't blow up until it gets to the .topAnchor line, so that's the problem. I can ask a second question once I understand the reason for this exception (in case you're wondering what I'm trying to do): how do I add a user input (url) bar at the top of my UIWebView.  (that didn't work either - same results if I try to constrain against my self.webView which is displaying perfectly) Also: I call self.view.setNeedsDisplay() before viewWillAppear() is called.</p>