title: NSLayoutConstraint in swift
body: <p>I am trying to convert the following code to Swift:</p>
  
  <pre><code>leftConstraint = [NSLayoutConstraint constraintWithItem:self.contentView
                                                attribute:NSLayoutAttributeLeft
                                                relatedBy:0
                                                   toItem:self.view
                                                attribute:NSLayoutAttributeLeft
                                               multiplier:1.0
                                                 constant:0];
  [self.view addConstraint:leftConstraint];
  </code></pre>
  
  <p>Can someone give me the new syntax to do it in Swift?</p>