title: New to Auto Layout - why isn't my view appearing?
body: <p>I have the following code:</p>
  
  <pre><code>        UITextField *loginBox = [[UITextField alloc] init];
          loginBox.translatesAutoresizingMaskIntoConstraints = NO;
  
          [self.view addSubview:loginBox];
  
          NSLayoutConstraint *horizontalPlacementConstraint = [NSLayoutConstraint constraintWithItem:loginBox attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeLeading multiplier:1.0 constant:0.0];
          [self.view addConstraint:horizontalPlacementConstraint];
  
          NSLayoutConstraint *verticalPlacementConstraint = [NSLayoutConstraint constraintWithItem:loginBox attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self.view attribute:NSLayoutAttributeTop multiplier:1.0 constant:0.0];
          [self.view addConstraint:verticalPlacementConstraint];
  
          NSLayoutConstraint *widthConstraint = [NSLayoutConstraint constraintWithItem:loginBox attribute:NSLayoutAttributeWidth relatedBy:0 toItem:nil attribute:NSLayoutAttributeNotAnAttribute multiplier:1.0 constant:100];
          [self.view addConstraint:widthConstraint];
  </code></pre>
  
  <p>(Not possible to do in IB.)</p>
  
  <p>But when I load the view, it never shows the textfield. Why is this? </p>