title: iOS 8.3 UIAlertController crashes when trying to add a textfield
body: <p>I have an iPad app. I am creating an UIAlertController and adding a textfield.  It crashes. It only crashes when I add a textfield. </p>
  
  <pre><code>let alert = UIAlertController(title: "Enter Name", message:nil, preferredStyle: UIAlertControllerStyle.Alert);         
  alert.addTextFieldWithConfigurationHandler { (textfield:UITextField!) -&gt; Void in
                  textfield.placeholder = "Sexy time";
  
              }
   alert.addAction(UIAlertAction(title: "Ok", style: UIAlertActionStyle.Default, handler: {(action:UIAlertAction!) -&gt; Void in
        //Some action here   
   }));
  
   self.presentViewController(alert, animated: true, completion: nil);
  </code></pre>
  
  <p>I get a fun crash telling me that the constraints are messed up.  This code works fine in &lt; 8.3 with no warnings.  Even on a clean project with nothing in it but this code, it crashes - The project needs to be a splitview project on iPad.</p>
  
  <p>Here is the full stack trace plus bizarre constraint warnings which appears only after trying to add the textfield to alertController.</p>
  
  <pre><code>2015-04-10 15:25:07.155 Observation[18235:281813] The view hierarchy is not prepared for the constraint: &lt;NSLayoutConstraint:0x7fb66cf9dfc0 UITableView:0x7fb66b855000.left == UIView:0x7fb66fae68e0.left&gt;
      When added to a view, the constraint's items must be descendants of that view (or the view itself). This will crash if the constraint needs to be resolved before the view hierarchy is assembled. Break on -[UIView _viewHierarchyUnpreparedForConstraint:] to debug.
  2015-04-10 15:25:07.155 Observation[18235:281813] The view hierarchy is not prepared for the constraint: &lt;NSLayoutConstraint:0x7fb66cf9e010 UITableView:0x7fb66b855000.right == UIView:0x7fb66fae68e0.right&gt;
      When added to a view, the constraint's items must be descendants of that view (or the view itself). This will crash if the constraint needs to be resolved before the view hierarchy is assembled. Break on -[UIView _viewHierarchyUnpreparedForConstraint:] to debug.
  2015-04-10 15:25:07.155 Observation[18235:281813] The view hierarchy is not prepared for the constraint: &lt;NSLayoutConstraint:0x7fb66fb37f90 UITableView:0x7fb66b855000.top == UIView:0x7fb66fae68e0.top&gt;
      When added to a view, the constraint's items must be descendants of that view (or the view itself). This will crash if the constraint needs to be resolved before the view hierarchy is assembled. Break on -[UIView _viewHierarchyUnpreparedForConstraint:] to debug.
  2015-04-10 15:25:07.156 Observation[18235:281813] The view hierarchy is not prepared for the constraint: &lt;NSLayoutConstraint:0x7fb66fb80580 UITableView:0x7fb66b855000.bottom == UIView:0x7fb66fae68e0.bottom&gt;
      When added to a view, the constraint's items must be descendants of that view (or the view itself). This will crash if the constraint needs to be resolved before the view hierarchy is assembled. Break on -[UIView _viewHierarchyUnpreparedForConstraint:] to debug.
  2015-04-10 15:25:13.589 Observation[18235:281813] View hierarchy unprepared for constraint.
      Constraint: &lt;NSLayoutConstraint:0x7fb66cf9dfc0 UITableView:0x7fb66b855000.left == UIView:0x7fb66fae68e0.left&gt;
      Container hierarchy: 
  &lt;UIView: 0x7fb66fa86e00; frame = (0 0; 0 0); layer = &lt;CALayer: 0x7fb66fadf8e0&gt;&gt;
     | &lt;UIView: 0x7fb66af3e080; frame = (0 0; 0 0); clipsToBounds = YES; layer = &lt;CALayer: 0x7fb66fae32c0&gt;&gt;
     |    | &lt;_UIAlertControllerShadowedScrollView: 0x7fb66fa68c80; frame = (0 0; 0 0); clipsToBounds = YES; gestureRecognizers = &lt;NSArray: 0x7fb66fa38a80&gt;; layer = &lt;CALayer: 0x7fb66fa97560&gt;; contentOffset: {0, 0}; contentSize: {0, 0}&gt;
     |    |    | &lt;UIView: 0x7fb66fa87350; frame = (0 0; 0 0); layer = &lt;CALayer: 0x7fb66fadf810&gt;&gt;
     |    |    |    | &lt;UILabel: 0x7fb66fa88740; frame = (0 0; 0 0); text = 'Enter Name'; userInteractionEnabled = NO; layer = &lt;_UILabelLayer: 0x7fb66fa94ed0&gt;&gt;
     |    |    |    | &lt;UILabel: 0x7fb66fa73710; frame = (0 0; 0 0); userInteractionEnabled = NO; layer = &lt;_UILabelLayer: 0x7fb66cc0ee10&gt;&gt;
     |    |    |    | &lt;UIView: 0x7fb66fae68e0; frame = (0 0; 0 0); clipsToBounds = YES; layer = &lt;CALayer: 0x7fb66fa90160&gt;&gt;
     |    | &lt;UILabel: 0x7fb66fa3ad40; frame = (0 0; 0 0); userInteractionEnabled = NO; layer = &lt;_UILabelLayer: 0x7fb66fa73680&gt;&gt;
     |    | &lt;UICollectionView: 0x7fb66c130200; frame = (0 0; 0 0); clipsToBounds = YES; gestureRecognizers = &lt;NSArray: 0x7fb66faebab0&gt;; layer = &lt;CALayer: 0x7fb66fa3acf0&gt;; contentOffset: {0, 0}; contentSize: {0, 0}&gt; collection view layout: &lt;_UIAlertControllerCollectionViewFlowLayout: 0x7fb66fae0b30&gt;
      View not found in container hierarchy: &lt;UITableView: 0x7fb66b855000; frame = (0 20; 768 1004); clipsToBounds = YES; autoresize = W+H; gestureRecognizers = &lt;NSArray: 0x7fb66cf79f30&gt;; layer = &lt;CALayer: 0x7fb66cf600a0&gt;; contentOffset: {0, 0}; contentSize: {768, 25}&gt;
      That view's superview: NO SUPERVIEW
  2015-04-10 15:25:13.594 Observation[18235:281813] *** Terminating app due to uncaught exception 'NSGenericException', reason: 'Unable to install constraint on view.  Does the constraint reference something from outside the subtree of the view?  That's illegal. constraint:&lt;NSLayoutConstraint:0x7fb66cf9dfc0 UITableView:0x7fb66b855000.left == UIView:0x7fb66fae68e0.left&gt; view:&lt;UIView: 0x7fb66fa86e00; frame = (0 0; 0 0); layer = &lt;CALayer: 0x7fb66fadf8e0&gt;&gt;'
  *** First throw call stack:
  (
      0   CoreFoundation                      0x0000000102940c65 __exceptionPreprocess + 165
      1   libobjc.A.dylib                     0x000000010221dbb7 objc_exception_throw + 45
      2   CoreFoundation                      0x0000000102940b9d +[NSException raise:format:] + 205
      3   Foundation                          0x0000000101daf479 -[NSLayoutConstraint _addToEngine:integralizationAdjustment:mutuallyExclusiveConstraints:] + 187
      4   UIKit                               0x00000001039bca34 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 474
      5   Foundation                          0x0000000101dbd1be -[NSISEngine withBehaviors:performModifications:] + 155
      6   UIKit                               0x00000001039bc83a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 452
      7   UIKit                               0x00000001039bc64d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 197
      8   UIKit                               0x00000001039bc933 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 217
      9   Foundation                          0x0000000101dbd1be -[NSISEngine withBehaviors:performModifications:] + 155
      10  UIKit                               0x00000001039bc83a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 452
      11  UIKit                               0x00000001039bc64d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 197
      12  UIKit                               0x00000001039bc933 __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke_2 + 217
      13  Foundation                          0x0000000101dbd1be -[NSISEngine withBehaviors:performModifications:] + 155
      14  UIKit                               0x00000001039bc83a __57-[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:]_block_invoke + 452
      15  UIKit                               0x00000001039bc64d -[UIView(AdditionalLayoutSupport) _switchToLayoutEngine:] + 197
      16  UIKit                               0x00000001033b5717 __40-[UIView(Hierarchy) layoutBelowIfNeeded]_block_invoke + 39
      17  Foundation                          0x0000000101dbd1be -[NSISEngine withBehaviors:performModifications:] + 155
      18  UIKit                               0x00000001033b5556 -[UIView(Hierarchy) layoutBelowIfNeeded] + 320
      19  UIKit                               0x000000010374a394 -[_UIAlertControllerAnimatedTransitioning animateTransition:] + 470
      20  UIKit                               0x000000010344fa4e __56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 1867
      21  UIKit                               0x000000010336562c _applyBlockToCFArrayCopiedToStack + 314
      22  UIKit                               0x00000001033654a6 _afterCACommitHandler + 533
      23  CoreFoundation                      0x0000000102873ca7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
      24  CoreFoundation                      0x0000000102873c00 __CFRunLoopDoObservers + 368
      25  CoreFoundation                      0x0000000102869a33 __CFRunLoopRun + 1123
      26  CoreFoundation                      0x0000000102869366 CFRunLoopRunSpecific + 470
      27  GraphicsServices                    0x0000000106dd6a3e GSEventRunModal + 161
      28  UIKit                               0x0000000103341900 UIApplicationMain + 1282
      29  Observation                         0x0000000101612927 main + 135
      30  libdyld.dylib                       0x0000000104f60145 start + 1
  )
  libc++abi.dylib: terminating with uncaught exception of type NSException
  </code></pre>